# Clone repo to current folder
git clone https://github.com/USERNAME/REPOSITORY.git
# Clone repo to specified folder
git clone https://github.com/USERNAME/REPOSITORY.git specified-folder
# Clone the contents of the repo to current folder
git clone https://github.com/USERNAME/REPOSITORY.git .
# Clone repo with history truncated to specified commts
git clone --depth=1 git@github.com:USERNAME/REPOSITORY.git
# add the original repository as remote repository called "upstream"
git remote add upstream https://github.com/USERNAME/REPOSITORY.git
# fetch all changes from the upstream repository
git fetch upstream
# switch to the master branch of your fork
git checkout master
# merge changes from the upstream repository into your fork
git merge upstream/master