Re: Xcode keeps altering my project.pbxproj files
Re: Xcode keeps altering my project.pbxproj files
- Subject: Re: Xcode keeps altering my project.pbxproj files
- From: Conrad Taylor <email@hidden>
- Date: Sun, 31 Jul 2011 14:59:49 -0700
On Sun, Jul 31, 2011 at 11:21 AM, Jens Alfke
<email@hidden> wrote:
On Jul 31, 2011, at 11:10 AM, David Duncan wrote:
This is a one-time upgrade from the project when you open it in Xcode 4.2. If your going back and forth between <4.2 and 4.2, its probably best to ignore it for now, if you are sticking to 4.2, just check it in.
That makes sense; but still, this smells like something that should be stored in the local user info, not in the project file itself. (Does my co-worker Sue’s copy of Xcode really care whether I have Xcode 4.2 or not?) Or at least, it should be written to the project only if some other change is also being made.
She might if you're doing anything specific for Mac OS 10.7.
As it is, it causes noise when working with SCM, especially in projects that I only have read-only access to. For example, if I check out someone’s library from GitHub and build it, Git will now think I have uncommitted changes, which means it may complain at me when I try to pull new revisions or switch branches. So then I have to keep closing the project and doing a “git reset HEAD -- Foobar.xcodeproj” first.
This will happen if you have made changes to the files within the repository without committing. Furthermore, if you would like to pull revisions from the repo without committing your local changes, then you can simply do the following:
a) git stash # save you uncommitted files
b) git pull # pull the latest revision of the repository
If you would like to get your uncommitted changes back, then you would simple do a 'git stash pop'. Lastly, if you build a project within the project directory, then you'll have a list of files under the 'Untracked files:" when you perform a 'git status'. For example, you may see something like the following:
# Untracked files:
# (use "git add <file>..." to include in what will be committed)
#
# <PROJECT_NAME>.xcodeproj/project.xcworkspace/
# <PROJECT_NAME>.xcodeproj/xcuserdata/
The above two files are specific to the individual user and not the project and should not be checked into the repository. Thus, you can easily create a .gitignore file which contains the following:
<PROJECT_NAME>.xcodeproj/project.xcworkspace/*
<PROJECT_NAME>.xcodeproj/xcuserdata/*
Finally, I would customize as needed and check this file into the git repository as well as remove the above two directories from it.
Good luck,
-Conrad
_______________________________________________
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