Hi,
This is a follow up to a question asked about git in another thread.
This is how I did it.
I started out with this entry in the FAQ, but it turns out I had better luck with instructions I found elsewhere. Maybe after we finish fleshing this out, we can update the FAQ with updated instructions.
Download and install homebrew
From a terminal window type 'brew install git'
Go to GitHub.com and sign up for a free account.
Sign in to your GitHub.com account, find the cocos2d-iphone project, click the 'Fork' button to create your own copy of the project to work with.
Go back to your terminal window and use your 'private' git url to clone the project to your local machine. ( i.e. git clone git@github.com:YOUR-GIT-LOGIN/cocos2d-iphone.git LOCAL-DESTINATION-DIRECTORY )
cd LOCAL-DESTINATION-DIRECTORY
'git status' will probably just show one branch, master .
Type 'git checkout develop'. This will download the develop branch and set up the remote tracking branch to your cocos2d-iphone fork.
You should also set up a remote branch for the cocos2d-iphone git repository, so you can keep your fork up to date: like:
git remote add cocos2dServer http://github.com/cocos2d/cocos2d-iphone.git
to get the most recent changes to the cocos2d-iphone develop branch, for example, you would do this:
git checkout develop
git pull cocos2dServer
*note: cocos2dServer is an arbitrary name, name it to whatever makes sense to you.
I liked adding an option to only push whatever branch you are currently in by:
git config push.default current
You only have to set the default once, and git will remember it.
You now have the most recent development code from the develop branch of cocos2d-iphone in your local git repo.
You can now push this up to your fork to keep it current.
git push
create a branch for you to work on:
git checkout develop
git branch YOURBRANCHNAME
git checkout YOURBRANCHNAME
make the changes you want
git add .
git commit
git push
That will push your code up to your fork at github.com .
Then submit an issue ticket in the cocos2d-iphone issue tracker, and let them know where to find your code at github.