Working with Git branches

A branch in Git is a lightweight movable pointer to the commits that you make. The name of the default branch is master. Whenever you make any commit, it automatically moves forward.

In Git, you can create sub-branches to create another line of development from the master repository to work on a new feature or to fix a bug. Once the feature or the bug fixing is complete, it is merged back to the main/master branch and deletes the sub-branch that we worked with as shown in the following diagram:

Every branch is referenced by HEAD, which points to the latest commit in that branch. Whenever you make a commit, the HEAD ...

Get Mastering Visual Studio 2017 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.