In this post you will learn how to work in Git branches like: create, delete, merge branch data.
1. List all branches of your repository.
2. Create new branch.
3. Delete the specified branch. This is a “safe” operation in that Git prevents you from deleting the branch if it has unmerged changes.
1. List all branches of your repository.
$ git branch
2. Create new branch.
$ git branch {branchName}
Example:
$git branch qa
3. Delete the specified branch. This is a “safe” operation in that Git prevents you from deleting the branch if it has unmerged changes.
$ git branch -d {branchName}
Example:
$git branch -d qa