<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def add_file_to_repo(filename):
 """Add a file to the git repo This method does the same than a :: $ git add filename Keyword Arguments: :filename: (str) -- name of the file to commit Returns: <nothing> """

    try:
        repo = Repo()
        index = repo.index
        index.add([_delta_dir() + filename])
    except Exception as e:
        print("exception while gitadding file: %s" % e.message)