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?
It is the grey bar in the middle that says File Status, Branches, Remotes. Your current branch is master.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
How do I select the target branch. Maybe I am cherry picking back to the same branch.
Anyway thanks for the help so far.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
"Nothing to commit" => Looks like the change you were trying to cherry pick is already included in the target branch
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Try refreshing the view (F5) in the commit dialog. It has to show all uncommitted changes after this. You can select them to be committed or discard them as you see fit.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I like http://kdiff3.sourceforge.net/ , it is simple, fast and free. (In SourceTree, go to Tools\Options\Diff to set up the integration.)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Cherry pick:
diff program: a file comparison tool that can do merges. (You will need something that can do 3-way merge.)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
[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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.