How do I add an external git repo (such as code.google.com) to Xcode with my project. All I am able to get is to add in the repo, but not use it with any projects. I have been trying the command line options from various websites with no success.
Asked
Active
Viewed 1,036 times
3 Answers
2
I find XCode has rather rudimentary SCM support. Do yourself a favour and use either the command line or a GUI client, you'll save headaches when things go wrong and the built in client with xcode doesn't always reveal things. Xcode is happy to look at the .git files or .svn files and tell if the status which is useful, but that's as far as I let it go.

Mitchell Currie
- 2,769
- 3
- 20
- 26
-
Try the evaluation copy of Tower for Git. It's like SCM candy. – Mitchell Currie Aug 10 '11 at 04:26
1
Xcode will create and manage the repository for you locally, but you will need to push your commits using the command line. I've been using it with GitHub, and ran into no issues so far.
Once you push your repo to the web server, all the local commits will sync and upload.

antalkerekes
- 2,128
- 1
- 20
- 36
-
1Doesn't have to be the command-line though. You could use Githubs's Mac client, or something like GitX. There must be a list here on Stackoverflow with good Mac Git clients. – Thilo Aug 10 '11 at 04:32
-
What do you mean with "will sync and upload"? I created a project in Xcode with a local git repo from the start. I set up a remote with the command line on a mac server in my local network (with a user named 'git' and the remote on its home directory). After fighting a bit with the dreaded "command not found" errors, I was able to push from the command line. But in Xcode, the remote appears as offline... – Nicolas Miari Jun 13 '12 at 15:15
-
Should I commit only from Xcode, and push with the command line? I'm downloading SourceTree right now... – Nicolas Miari Jun 13 '12 at 15:16
1
SourceTree is excellent, I use it and the CLI
http://itunes.apple.com/us/app/sourcetree-git-hg/id411678673?mt=12

Michael
- 419
- 3
- 11
-
I tried SourceTree, and I'M still getting the "git-receive-pack: command not found" message on push attempts. The command line works fine, though... WTF? – Nicolas Miari Jun 13 '12 at 15:23
-
http://stackoverflow.com/questions/225291/git-upload-pack-command-not-found-how-to-fix-this-correctly fixes this most likely – Michael Sep 09 '13 at 15:40