5 ms·
Wow, just learned git add -p That is fantastically useful. *(Walks you through "hunks" (finer granularity than files) and asks if you want to stage them.)
by bobz 14y ago
Wow, just learned git add -p
That is fantastically useful.
*(Walks you through "hunks" (finer granularity than files) and asks if you want to stage them.)
- zxoq 14y agoWhile useful, it's very dangerous in that it's serendipitous to make a commit that breaks building the project, which in the future will break building the project when checking out old commits, or introduce some subtle bug, which breaks other tools like bisect. Just a personal preference, but I strongly prefer being able to build (and test) every commit in the entire history.
- xyzzyb 14y agoSo after you're done, go back through the commits and run your build tests. https://www.destroyallsoftware.com/screencasts/catalog/source-code-history-integrity https://www.destroyallsoftware.com/screencasts/catalog/sourc...
- js2 14y agogit add -p git commmit git stash build && test git stash pop rinse && wash && repeat