git2r icon indicating copy to clipboard operation
git2r copied to clipboard

add() all changes automatically

Open florisvdh opened this issue 6 years ago • 3 comments

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

florisvdh avatar Aug 14 '18 12:08 florisvdh

Thanks. You can use commit() with all=TRUE. Does that work in your case?

stewid avatar Aug 14 '18 14:08 stewid

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.

florisvdh avatar Aug 14 '18 16:08 florisvdh

I have found that using commit(all = TRUE) does not commit (or stage) new files in the repository. Has this change since ths version?

WillCHL avatar Mar 10 '23 04:03 WillCHL