Nov 23, 2010

How to use Git, really

1. When one wants to start working, he/she NEEDS to fork a new branch by using

git checkout -b branch_name

2. After making some changes, you can:

git commit -a -m "message here"

3. You can push your updates to the server, but if your friend worked on the same branch before, you might want to pull first:

git pull

Then:

git push

4. After sometimes, you might want to merge your branch with the main branch:

git checkout master (switch to the main branch)
git pull (get new updates)
git pull branch_name (merge with your branch)

Then after merging, you NEED to fork again in order to make another change.