|[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]|
Onward and upward ... I've been in branching hell today, but I think I've at least figured out what's wrong. a. When you create a branch in Xcode 4, it always creates it in the local repository. b. There's no way in Xcode, AFAICT, to push that branch to the remote repository. So, you have to use the command line for this. Well, OK, that was true getting the initial branch uploaded too. But once it's there, it gets a little weirder: c. You can clone either remote branch in Xcode, by selecting the appropriate branch in its "extra" repository entry for the remote repository as a whole. (You can't avoid it creating this extra one for you.) If you select nothing, you only get one branch -- I always got 'master'. Otherwise, you can select one thing and you get that branch. d. You can't clone multiple branches into the same local repository AFAICT. (I tried to multiple select for the clone, but it doesn't let you.) The problem is that Xcode can only merge branches within a local repository (AFAICT), so you're going to have to do something manually or you'll never be able to merge anything. Googling found me this command line solution: git branch --track branch-2 origin/branch-2 where 'branch-2' is of course a branch that's missing from the local repository. Xcode will eventually notice the change, and then I think everything's fine after that. Anyone got an opinion if this is a design flaw in Xcode, or just a bug, or am I misunderstanding something here? e. If you create a branch in a local repository with Xcode, and push it to the remote repository yourself (a-b above), then that branch won't pull in Xcode -- you get an error that "The operation could not be performed because the tracking branch for the current branch could not be located." It seems to me there's no way to fix that even from the command line. I couldn't see anything that suggested you could do the "--track" thing on an existing local branch. Is there a way of doing it that I'm missing? The only way I found to get out of this state was to trash the local repository and re-clone the remote copy, then add the other branch manually as a tracking branch (d above). I think Xcode's problem is that it doesn't really seem to understand remote repositories as mirrors, only as "local" repositories hosted elsewhere -- which is certainly a valid git usage case too. Unfortunately, when someone else owns the server, like Beanstalk, the other repository isn't local *anywhere*, so it's impossible to administer within Xcode. That's a pity, because when you stick within the bounds of what Xcode can actually do, git-based Xcode-integrated SCM is a joy to use. _______________________________________________ Do not post admin requests to the list. They will be ignored. Xcode-users mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
Visit the Apple Store online or at retail locations.
Copyright © 2011 Apple Inc. All rights reserved.