1. Create the git repository:
git init
2. To commit any changes, you type in: git commit -a -m "thing that I changed"
3. To branch, you type in: git checkout -b newbranch
4. To switch back to a branch, you just type in: git commit -a -m "changes made on branch"
git checkout <branch>
5. To merge in a branch to the current branch, you type in: git merge <branch>
6. To push to a remote repository, you first add a remote repository by typing in the following: git remote add origin git@example.com:my_project.git
(origin can be anything, but a good convention to use for the main repo that you are pushing to).Now to push your changes, you just use:
git push origin <branch>
Most often you will use: git push origin master