I have a problem here and I don't know why, perhaps I did something wrong. I was working in the same file and other developer was working on it too. He told me that file was pushed to the repository, alright. Before pull the changes I made a commit so my changes was saved and merged with the ones from the other developer but surprise the file is giving me conflicts and I do not what to do for not to loose the other developer changes and mines too. If I open right click => Resolve conflict I got this window:
What each option there means? Which one is more secure and save both changes? (developer and mines)
If I open Conflict solver
then I got something like this:
But again I don't know how or what to do in order to maintain both changes, any advice? Help?
I don't use smartgit, but from the screenshot I can tell the options map to git commands as below:
git checkout --ours -- FILE
git checkout --theirs -- FILE
You may be curious why we use --theirs
when using my changes
, while --ours
when using their changes
, this is because you are doing rebase
, you are rebasing your original changes on other developers' changes. When you are doing rebase
, it's like saving your changes in a temporary file, and moving the HEAD
to the latest commit of the remote branch(other developers' changes), and replaying your changes over the current branch, in which case your changes become theirs
.
Since you want to save both changes, you should resolve all the conflicts manually, and mark the file as resolved
and then continue rebasing.
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