git2r
git2r copied to clipboard
add() all changes automatically
A very nice project! Would it be possible to add an argument to add()
in order to automatically stage all files that have changed in the working directory? This would do the same as git add --all
Thanks. You can use commit()
with all=TRUE
. Does that work in your case?
That should usually work indeed. However, I believe that often mistakes can be avoided by first inspecting the staging area (as a dry run before committing). For example, when a new folder has been added, it is not immediately clear from status()
which would be the effect of commit(all = TRUE)
as you do not see the individual files or subfolders within that new folder.
Of course, it depends on the usecases that you envisage. This is just an idea, I don't immediately 'need' that feature myself.
I have found that using commit(all = TRUE)
does not commit (or stage) new files in the repository. Has this change since ths version?