Building Enterprise JavaScript Applications
上QQ阅读APP看书,第一时间看更新

Cloning a repository

Our code is now publicly available on GitHub. Our colleagues and/or collaborators can now download the code using the git clone command:

$ git clone https://github.com/d4nyll/hobnob.git

This will create a new directory inside the directory where the git clone command was run, and copy the contents of the remote repository into it.

Your collaborators can then work on this local copy of the repository, commit changes, and add new branches. Once they are ready to make their changes available to others, they can pull from the remote repository, resolve merge conflicts, and then push their changes back to origin:

$ git pull
# Resolves any conflicts
$ git push