

To put it in the simplest way, the Master branch contains all of the official code for a project (aka repository). Why Would I Create a Branch Separate From the Master Branch? It's an essential part of our everyday lives as developer to use it!įor sake of brevity, we're going to assume you are working in an existing repository (aka project that already has a Master branch) However when I was hired in my first tech role, I soon realized how essential it was to be acquainted with using Git in the terminal. Instead, I used GitHub Desktop which allowed me to lazily drag and drop files. Git was one of the things I was scared of when I was learning how to code- mostly due to my irrational fear of the command line. Git is an essential part of every day life as a developer and my goal is to help make the transition to using Git (and ultimately the command line), a smooth and hopefully easy learning curve. If you also provide a SHA-1 hash of a specific revision, your new branch will use that commit as its starting point.Let's just pretend she's reading the latest post on dev.to.īreak Git Down is a super beginner-friendly series to help newer developers learn a few of the most important Git tasks that you will certainly use. If you want to delete a remote branch, add the "-r" flag in addition to "-d".Ĭreate a new local branch based on your currently checked out branch.Be careful with this, though: deleting branches that contain unmerged data shouldn't be done lightly.


Provides more information about all your branches. It's the go-to command when it comes to managing any aspect of your branches - no matter if in your local repository or on your remotes. The "branch" command helps you create, delete, and list branches.
