Many people have asked me repeating questions about git. I have compiled a very brief post that sums up the answers:
Your local repository consists of three “trees” maintained by git. The first one is your Working Directory which holds the actual files. The second one is the Index which acts as a staging area and finally the HEAD which points to the last commit you’ve made.
Index and Add
The “index” holds a snapshot of the content of the working tree, and it is this snapshot that is taken as the contents of the next commit. Thus after making any changes to the working tree, and before running the commit command, you must use the add command to add any new or modified files to the index.
Pushing changes
After committing, your changes are in the HEAD of your local working copy. To send those changes to your remote repository you need to push them.
[…] Learn how to use Git together with Xcode. If you are new to git, also have a look at this. […]