With Git I am on a branch. I am rebasing the branch atop master. There is a conflict that I want to resolve by ignoring the branches version and accepting master's version. How do I indicate I want to use master's version of the file during the rebase-ing.
Thanks,
Doug
git checkout --ours <path-to-file>
is the command you are looking for.
It will checkout the master version of the file which you then can add to the index (to mark the conflict resolved) and continue your rebase.
You can take a look at the checkout documentation for more information.
See the comment under --merge
as to why you need to use --ours
and not --theirs
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With