All tags
merge
- Tip
git merge --no-ff feature -m "Merge feature"git merge --no-ff keeps a merge commit even when Git could fast-forwardAlways creates a merge commit, so a finished feature branch stays visible as a group in the history.3 Dec 2026 - Tip
git merge --squash featuregit merge --squash turns a whole branch into one staged changeApplies all changes of a branch to your working tree without committing, so you can record them as one commit.3 Dec 2026 - Tip
git merge --abortgit merge --abort gets you out of a merge that ended in conflictsCancels a merge that stopped on conflicts and puts the branch back the way it was before.3 Dec 2026 - Tip
git log --oneline --ancestry-path --merges abc1234..maingit log with ancestry-path shows how a commit reached mainFinds the merge that brought a specific commit into a branch.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 revert -m 1 <merge-commit>git revert -m 1 undoes a merge commitUndoes a merge commit by telling git which parent counts as the main line.28 Nov 2026 - Tip
git config --global merge.conflictStyle zdiff3Merge.conflictStyle zdiff3 shows the common ancestor in conflictsAdds the original text to merge conflicts so you can see what each side changed.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
Nothing matches.