I quite often struggle to remember these steps so thought it would be useful to write them down here for future reference and for anyone else on the web to use.
Here I will be setting configuring my existing Xcode project which is not source code managed presently and hooking it up to a BeanStalkApp.com git repository.
- Create your new repository over at www.beanstalkapp.com
- For my projected I decided to use https so I copied this URL
- Open terminal and navigate to the root folder of your Xcode project
- Create a new file in the root directory called .gitignore
- Add the contents of this Gist to the ignore file https://gist.github.com/aaronwardle/8976367
- Back in Terminal type the command git init and press return
- Then type to add all your files to git
git add .
- You will now need to commit your changes so type in
git commit -m “Adding git ignore file”
- Once the files are committed to your local repository you will now need to add the remote server type in the following command
git remote add origin
Replace the X’s with your specifics or even better just use the URL which you got from BeanStalkApp in step 2
- Now you are ready to push all your changes to BeanStalk
- Type in the following command
git push origin master
Once you have done this simply restart Xcode and it will detect that the project is now managed by Git, and you should now be able to push / pull changes to Beanstalkapp.com via Xcode.