I’ve been playing with Xcode’s Git implementation. I’ve traditionally used SVN for my source control, but with the rise of DVCS, I wanted to learn more about Git. I’ve used in the past, but just for the basic stuff under Windows–and I just used the command line. I wanted to see what IDE integration would bring to the table.

Anyway, Xcode’s got some basic git tools installed. A couple of things I ran into with using it on Bitbucket.org though:

  • You have to create the repository using something else (like SourceTree, command line, or on the Bitbucket interface itself. Then use the Xcode ‘Clone repository’ tools.
  • In the organizer, use the string git@bitbucket.org/username/repo.git when adding the repository.
  • In the organizer screen, the username will show as ‘git’, not your username. Don’t change it!
  • Make sure you upload your SSH public key to Bitbucket. HTTPS works, but SSH is much better under other tools like SourceTree, or git command line.
  • I haven’t tried using the command line tools under Xcode, but I’m sure they’ll work fine. Just remember to preface the command with ‘xcrun’

  • xcrun git init
  • xcrun git add
  • xcrun git commit
  • You get the idea.