Created
December 24, 2021 11:54
-
-
Save InBrewJ/893326a0076ba40e4d556e05b69269a5 to your computer and use it in GitHub Desktop.
git rebase: always trust one source of commits for merge conflicts
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
## See https://stackoverflow.com/a/66766065/8249410 | |
## IN A REBASE, THE MEANING OF OURS / THEIRS IS REVERSED | |
## Because we're replaying commits over the other branch, the commits you're adding over the | |
## base branch become 'theirs' wrt the base branch | |
## capeesh? | |
## To choose the influence of `origin/main` for rebase conflicts | |
git rebase -s recursive -X ours origin/main | |
## To choose the influence of your current branch for rebase conflicts | |
git rebase -s recursive -X theirs origin/main |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment