Git - How to create a branches?

10:15:00 AM Unknown 0 Comments



Branching is a feature available in all version control systems like git and subversion. Git branches tracks your changes. The changes in particular branch won't effect to parent until you merge.

List of basic commands for git branches:

List of branches in repository:

git branch

Create a new branch

git checkout -b branch-name

It will switch to new branch

git checkout branch-name

It won't switch to new branch

Switching between branches

git checkout branch-name

Make sure you need to commit all your changes before switching.

Delete branches

git checkout -b branch-name

Force delete

git checkout -D branch-name

Git branch tutorial:



Next: Merging Git branches

More about git branches:
Visit git branching

Visit open snippets for download free and open source bootstrap themes, email templates and forms.