Skip to content

Instantly share code, notes, and snippets.

@AliciaMoses
Last active February 12, 2025 21:32
Show Gist options
  • Save AliciaMoses/cfe349874f2259101fedbcf18843fa9e to your computer and use it in GitHub Desktop.
Save AliciaMoses/cfe349874f2259101fedbcf18843fa9e to your computer and use it in GitHub Desktop.
FAO ADAM - FIX THIS MESS Auto resolve merge conflicts - current first
while ! git rebase --continue; do
git diff --name-only --diff-filter=U | while read file; do
# Apply 'ours' (current changes from HEAD) first
git checkout --ours "$file"
# Then apply 'theirs' (incoming changes)
git checkout --theirs "$file"
git add "$file"
done
git rebase --continue
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment