2

Consider the following common scenario

  1. Two developers created two branches from the same revision of the master
  2. One branch then was merged into master
  3. Second developer wants to keep working on his second branch, but second branch needs to be updated to current master, which now contains merged changes of the first developer.

So far we were using git command line and rebased the second branch. But I wonder if it's possible to achieve the same directly from xcode (and I don't care if it's a rebase, merge, or any combination).

I tried to use "Merge master into branch" option from right-click menu of Source Control navigator. It completes with "your branch is up to date", but you can see that it still shows that branch is 3 changes behind (red line consistently replaces the same branch name):

enter image description here

I also tried a Pull option from Source Control menu. Same result: I get "The repository is up to date." and branch is still 3 changes behind.

So is it possible and how?

timbre timbre
  • 12,648
  • 10
  • 46
  • 77

1 Answers1

1

3/6 should means: your branch is 3 commits behind/6 commits ahead of origin/yourBranch, not of master.

XCode 10 supports rebase:

https://cdn-images-1.medium.com/max/1091/1*X7uZX_ZjJKkzjECOkKTmQw.png

(source "What’s New, What’s Enhanced In Xcode 10", June 2018)

But that might work only from the branch of the same name (master in the case of the picture)

If that is the case, rebasing from the command line remains the cleanest (and fastest) solution.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250