Last active
January 29, 2026 08:46
-
-
Save jelc53/3bee6673174d0d613b26a7aeeb865abc to your computer and use it in GitHub Desktop.
helpful git commands for merge conflict resolution
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # List conflicted files | |
| git status --short | grep "^UU\|^AA\|^DD" | |
| # Compare full versions (not just conflict markers) | |
| git show HEAD:<file> | |
| git show MERGE_HEAD:<file> | |
| git diff HEAD MERGE_HEAD -- <file> | |
| # Understand history | |
| git log --oneline -20 -- <file> | |
| git log -p --all -S "<search string>" -- <file> | |
| # Trace dependencies | |
| rg "functionName" --type ts | |
| rg "export.*functionName" --type ts |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment