Re:I'm going to slowly move on from Mercurial
by polpo on Monday January 25, 2016 @02:56PM
(#10969510)
I don't understand why you need this as a hook. In recent versions of git, "git add" on a directory updates the index to match the entire directory, with modifications, additions, and deletions.
[ Parent
| on HN ]
Re:I'm going to slowly move on from Mercurial
by tzs on Monday January 25, 2016 @03:25PM
(#10969682)
Suppose the project looks like this when clean:
README.txt
src/
include/
doc/
TODO.oo3
In the midst of development, I may end up with files in some of these directories that are not supposed to go into the repository. There may be output files from test runs that I'm keeping around temporarily while I debug, notes (that will be incorporated into commit messages which is why the notes files do not belong in the repository), short-lived alternative versions of some of the source or include files, and so on.I don't want to "git add" on the project directory, or any of the subdirectories other than TODO.oo3 because I don't want to pick up those files. For everywhere except TODO.oo3, "git add -u" is what I (think I) want. It's only with TODO.oo3 that I want "git add" instead of (or in addition to) "git add -u".