You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
IndexFile.add(...) is not suited for possibly non-existing resources due to the behaviour you experienced already.
In your case, I believe it would be best to just call git directly like this: repo.git.add(update=True). repo is assumed to be the Repo instance from which you previously obtained the index as well.
Next time you have a question, you might want to consider using stackoverflow with the GitPython tag as this will drastically reduce the time it takes to receive a suitable answer.
If this works for you, please feel free to close this issue.
For committing all untracked changes (
git commit -a
) in GitPython, you have to add all dirty files to an indexand commit that (according to this answer on the mailing list from 2011).
Unfortunately, this doesn't work if there are deleted files. In this case, one gets
Any way for dealing with this?
The text was updated successfully, but these errors were encountered: