3 ms·
Love this. I would add: git commit —-fixup $COMMIT_ID combined with git rebase -i upstream/master —autosquash These have become staples of my recent wor
by ruraljuror 2y ago
Love this. I would add:
git commit —-fixup $COMMIT_ID
combined with
git rebase -i upstream/master —autosquash
These have become staples of my recent workflow. Julia’s example uses HEAD^^^^^ to rebase the previous 5 commits. I have been doing this as HEAD~5, until recently I realized you can just rebase all commits up to the upstream HEAD.
- lathiat 2y agoI only recently learnt this one, it's great for working with stacked patches in gerrit.
- mwpmaybe 2y agoAhh, thank you: git commit —-fixup $COMMIT_ID I'm adopting this immediately. I always make little "oops <topic>" commits like "oops GET users/me" and then manually move and fixup them on my next interactive rebase. This is much better!