How to merge from a second remote?
I've got two remotes. One is identical to my local and the other is slightly different (from a different project). How do I cherry-pick commits from the second remote and merge them into my project. So far I have trashed my local about 20 times trying to do this.
Also if there is a conflict how do I solve it?
[Assuming your clone has both remotes connected. If not, right click on "Remotes" and add the second one.]
Just above the top-left corner of the commit list, there is a drop-down (All Branches / Current Branch) and a checkbox (Show Remote Branches). Set these to All branches and on.
Do a Fetch, make sure the Fetch from all remotes option is on.
Now you should see the remote branches from both repos and you can cherry-pick merge from any of them.
For resolving conflicts, you need to have a diff program and set it up in Tools/options.
Thanks for the answer. Had no problem already with steps 1,2,& 3.
Please explain step 4 (cherry pick) as I can't figure out how to do this.
Also, when you say a diff program what do you mean? Up until now I've always edited my code in a text editor (Crimson).
diff program: a file comparison tool that can do merges. (You will need something that can do 3-way merge.)
Ok, I've got both remotes loaded. I fetch from remote one (copy of origin) and it says 5 commits behind. In the Log/history at the top it says "uncommitted changes". How do I commit those changes? Because while they are there I can't do anything. Tried the commit button but it doesn't commit them.
In your screenshot above there is a part of the window that you minimised to non-existence. It should be between the bookmarks and the history part. Make it appear. Here you will see the local branches and the remote branches. The one which is bold is the current branch. You can switch to another by double-clicking the branch name.
Supported Platforms macOS Windows To make using Sourcetree as simple yet powerful as possible we embed (bundle) dependencies such as Git, Git LFS, and Mercurial. We strive to keep these...
Connect with like-minded Atlassian users at free events near you!Find a group
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG
You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs