4 ms·
> Even better, use `git commit -p` and skip the staging area entirely. If you end up staging the wrong hunk, then you will have to reset and recommit. With gi
by u801e 8y ago
> Even better, use `git commit -p` and skip the staging area entirely.
If you end up staging the wrong hunk, then you will have to reset and recommit. With git add -p, you would only need to reset the hunk.
- tome 8y agoYou indeed have to recommit everything (which I prefer) but you don't have to reset anything (since nothing is in the staging area).
- u801e 8y ago>> If you end up staging the wrong hunk, then you will have to reset and recommit > you don't have to reset anything You have to reset the branch pointer to the previous commit, but I think using the --amend switch may do that for you.