3 ms·
The `-p` flag in general is very useful. With `git add`, sure it allows you to stage part of a file. That not all, when you're in edit mode (pressed "e" upon t
by bru 13y ago
The `-p` flag in general is very useful.
With `git add`, sure it allows you to stage part of a file. That not all, when you're in edit mode (pressed "e" upon the prompt) you just edit a patch. So you can actually put in your patch lines that are not in the source file. This can be very convenient e.g. if the 2 sets of change you want to commit separately are entangled. For example I used it yesterday to correct the level of indentation.
With `git stash show`, instead of having a short description of files changed in the stash, you get the patch itself.
etc.
Git man pages are well-written, and I always enjoy reading it. Most of the time I have one question but end up wiser (at least git-wise).