Re: Xcode git updates
Re: Xcode git updates
- Subject: Re: Xcode git updates
- From: Rory O'Bryan <email@hidden>
- Date: Wed, 13 Apr 2011 10:11:08 +0100
I've been learning about GIT and Xcode over the last few days and I haven't seen a way to do exactly what you want.
However I think you could get the basic functionality you're after if you used two branches in Xcode.
One branch would track the branch on the remote repository as it does now, and a new branch would act as your local "working" branch. You can pull the tracking branch to get new changes down to your local repository, and then use the version comparison tools in Xcode to compare the differences. Once you are satisfied with the changes you can then merge them into your "working" branch.
Later on, when you are ready, you can merge your "working" branch changes back over to the tracking branch and push it all back up to the remote repository.
I'm not sure how convenient the version comparison options are in Xcode for this workflow. I know you can use the Organiser -> Repositories window to inspect the changes in a branch compared to itself, and then the version editor in the main IDE will compare individual file across branches. So between the two I think you can work out the sum of all the changes that will take place but I don't think there's any way to directly compare entire branches like you get during a merge.
Of course you could also make use of a third local "test_merge" branch to test the merge and get an overview of what will happen, which may not be as crazy as it sounds, GIt is all about making branching and merging easy. In this case your workflow would be...
1) Switch to the "master" branch and pull the changes from remote repository.
2) Use Organiser -> Repositories to inspect the changes in the "master" branch.
3) For simple changes just switch to the "working" branch and merge in from "master"
4) For complex changes, create a new "test_merge" branch based on the "working" branch.
5) Switch to the "test_merge" branch and merge from the "master" branch.
6) Inspect the changes using the merge window and the version editor.
7) Once you are ready delete the "test_merge" branch.
8) Switch to "working" branch and merge in from the "master" branch for real.
It's probably not as complicated as it sounds, and having a separate working branches is standard GIT practice, from what I've read.
Alternatively perhaps you could just merge as you are now and just roll back from the command line with "git reset" if you didn't like the result.
A few ideas anyway..
Regards,
Rory O'Bryan
On 12 Apr 2011, at 14:24, Pelaia II, Tom wrote:
> Is there a way in Xcode to see which files will be updated in a git repository prior to a "Pull" command? When I perform a "Pull" command within Xcode, it simply updates all the files without telling me which ones it will update prior to the update unless there is a conflict. Unlike with SVN, I never see that files are awaiting update. I can only see which files it pulled after the fact by visiting the organizer. _______________________________________________
> 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
>
_______________________________________________
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