4 ms·
What I find especially powerful is when reviewing files in the commit window you can stage and commit subsection of files. It allows you to really quickly sepa
by temp453463343 14y ago
What I find especially powerful is when reviewing files in the commit window you can stage and commit subsection of files.
It allows you to really quickly separate out different change into unique commits and gets rid of the need to make messy I-did-A-and-then-did-B commits.
Select the lines you want in the commit window -> Right Click -> Stage Lines.
You can also revert selected lines, but for some reason it's grayed out half the time... I'm not sure what black magic controls that feature.
You can do all of that in the CLI but it's a lot more clunky and time consuming.
- trevorcreech 14y ago`git add -p` splits your changes into logical chunks and lets you choose whether to stage each on.
- __david__ 14y agoIt also lets you edit them (press e on a hunk)! I love that command. And it was clearly inspired by "darcs record". I also use commit-patch[1] quite a lot, it comes with Emacs integration which makes it heavenly (vc-diff then edit the patch to your liking, then commit). [1] http://porkrind.org/commit-patch/ http://porkrind.org/commit-patch/