For committing all untracked changes (git commit -a) in GitPython, you have to add all dirty files to an index
index.add([diff.a_blob.path for diff in index.diff(None)])
and 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
FileNotFoundError: [Errno 2] No such file or directory: 'path/to/deleted/file.txt'
Any way for dealing with this?
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?