All tags
rebase
- Tip
git commit --fixup=reword:HEAD~1Fixup=reword rewrites an older commit message at your next rebaseQueue a better message for an earlier commit without touching its files.1 Dec 2026 - Tip
git rebase --onto main feature-a feature-bgit rebase with onto moves a branch off another branch it was built onReplants only your own commits onto main when you branched from the wrong branch.30 Nov 2026 - Tip
git cherry -v maingit cherry -v shows which of your commits are not upstream yetCompares commits by their patch, so cherry-picked copies count as already merged.30 Nov 2026 - Tip
git checkout --theirs package-lock.jsongit checkout with ours or theirs picks one side of a conflicted fileResolves a whole conflicted file by taking your version or the incoming one.30 Nov 2026 - Tip
git reset --hard ORIG_HEADgit reset with ORIG_HEAD undoes a merge or rebase you just didJumps back to the commit you were on before the last merge, rebase or reset.30 Nov 2026 - Tip
git rebase --autostash origin/maingit rebase --autostash lets you rebase with a dirty working treeStashes uncommitted changes before a rebase and restores them afterwards.28 Nov 2026 - Tip
git rebase --update-refs maingit rebase --update-refs moves your stacked branches alongRebases a branch and also moves the branches stacked underneath it.28 Nov 2026 - Tip
git rebase --exec "make test" origin/maingit rebase --exec runs a command after every commitRuns a test command on every commit of a branch during a rebase and stops at the first failure.28 Nov 2026 - Tip
git config --global rerere.enabled trueTurn on rerere and resolve the same conflict only onceMakes git remember how you resolved a merge conflict and reuse it next time.7 Sep 2026 - Tip
git push --force-with-leaseUse --force-with-lease, not --forceForces a push only if nobody else has updated the remote branch since you last fetched.5 Jul 2026
Nothing matches.