Branches and branching
An impressive feature of Git is branching. There are times during development when your project enters a state that you're happy with. The work may not be completed or final, but you've reached an important milestone that should be committed and saved to the history. At this point, your project could take multiple directions, and you'd like to experiment a little, trying out new ideas or developing clever solutions for new features. On reaching this point, you effectively need to Branch your work. This instructs Git to make a duplicate of your work and its history to this point (a new Branch), and then you can make further commits on the new branch, without affecting the history of the original branch. That way, if you make changes that you later decide against or wish to remove, you can simply abandon the branch and return to the original, or make a new branch, and so on.
Note
Branching is great for team collaboration too. Different developers can each work on their...