I’ve used git for ~7 years now. Yesterday I learned two things I wish I knew all along: - git rebase β€”autostash stashes and unstashes local changes for you - git commit -v adds diffs to commit draft so that you can inspect them as you write commit msg What else am I missing?
50
202
20
938
Replying to @zeuxcg
'git reset - p' like 'git add - p' but for *unstaging* hunks

Feb 27, 2019 Β· 9:39 PM UTC

1
1
5
Ever try to hand-edit an unstaging hunk? After getting the hang of it for staging hunks and trying and failing everyone for unstaging hunks I have the feeling you just can't. (It's also pretty mind warping to try and understand)
1
I'll admit that I usually just unstage a hunk, then stash, then do other stuff, then unstash and continue. The idea of editing an unstaging hunk sounds terrifying.
1
1