How to create and delete branch on GitHub

Couple click solution for GitHub

Just started with GitHub and don't know how to create a new branches or delete the old ones? This tutorial will show you how to create and delete branches on GitHub. It is as easy ac couple clicks. 


Odoo • Image and Text

Why use branches on GitHub

Branches are useful especially when you are creating software for different versions of the system. For example same app can be available for Odoo 10, Odoo 11 and Odoo 12. Some code is different so you should create branches for every version of the software. GitHub then will provide you with the information on the difference between branches and update history.

You can also keep different branches for different software versions like Beta, ALsa and Master.

Odoo • Image and Text

Branch Creation

Navigate to the branch that you want to copy and type in the name of a new branch. GitHub will inform you that new branch will be created based on the selected one.

In some cases it is advised to create a new branch from the empty branch, this is because that for the other version of software code may be different.

Odoo • Image and Text

Delete a Branch

In order to delete a branch click on the "branches". The list of the branches will be displayed along with the red "delete" buttons. Just click and it is done.

 

Odoo • Image and Text

Use documentation

Most of the questions related to the GitHub are answered on the GitHub Help page.