Using Branches

It's hard to collaborate on a large project where many different people are working on the same set of files. There's always the chance that you're overwriting something another person wrote and vice versa. You will encounter these problems with your git repositories, but git and GitHub provide a powerful feature to deal with these conflicts: branches.

All git repos start with one master branch. All of your work so far has been committed as part of this branch. But you can also create your own branches--an offshoot of your project starting at a particular commit. You can make new commits inside a separate branch without affecting the master or other branches. And once you're done with your work, your feature branch can be merged back into the master. Keeping large chunks of your work in a separate feature branch from master also lets you use pull requests where your teammates can review what you want to merge into master and help with the process.