git fetch
: get remote commits to local repogit pull <repo> <branch-name>
e.g.git pull origin master
: get the commits from remote branch to current branchgit branch -a
: list all branches including remote branchesgit checkout <branch-name>
: switch to the branch
git branch -m <new-name>
: rename current local branch. Check this for more information.git checkout -b <new-branch>
: create a new branch based on the current branchgit checkout -b <new-branch> <existing-branch>
: create a new branch given an existing branch
git status
: list of files tracked and not trackedgit add .
orgit add
: add files to staging area
git clone [email protected]:YOUR-USERNAME/YOUR-FORKED-REPO.git
cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream