When working with other users' repositories, there are four basic commands you will need: git clone, git fetch, git pull and git remote prune.
Clone
To grab a complete copy of another user's repository when you do not have a local copy of the repository already established, you will use:
git clone <URL>
For public repositories, the URL can be a read-only URL like git://github.com/user/repo.git or an HTTPS write-able URL like https://github.com/user/repo.git. For public repositories you own, public repositories you are a collaborator on, and all private repositories, you must use a private SSH URL like git@github.com:user/repo.git or HTTPS URL like https://user@github.com/user/repo.git. You can find each of the URLs available to you in the header of the repository page:

Running git clone <URL> will automatically create a new subfolder, fetch the contents of the repository into this subfolder, then create and checkout the default branch (usually "master"). If there are other branches on the remote you will need to create a local branch to work in, for example git checkout -b fix_stuff origin/fix_stuff
Fetch
If you already have a local repository with a remote set up for the desired project, you can grab all branches and tags for the existing remote using git fetch <REMOTENAME>. By default, git clone will create a remote named origin pointing to the URL you cloned from. Fetch does not make any changes to local branches, so you will need to merge a remote branch with a paired local branch to incorporate newly fetch changes.
Pull
Similar to git fetch, you can use git pull <REMOTENAME> <BRANCHNAME> to fetch a specific branch and merge it into your current local branch. For one-time pulls from other users' repositories, you can use a URL in place of a remote name.
Because pull potentially performs a merge on the retrieved changes, you should ensure that your working tree and index are clean before running the pull command. If you run into a merge conflict you cannot resolve, or if you decide to abort the merge, you can use git merge --abort to take the branch back to the state it was in before you pulled.
Prune
Sometimes branches are deleted from an upstream repository, perhaps even by the recommendation of the user interface after a merged pull request. By default, git fetch will not remove any remote-tracking branches that have been deleted on the remote repository. Running git fetch --prune or git remote prune REMOTENAME will delete these tracking branches.

