Git Branching Commands
Create a release branch:
git checkout -b release-1.2 develop
npm version [major | minor | patch | X.X.X]
Finishing a release branch :
git checkout master
git merge --no-ff release-1.2
git tag -a 1.2
git checkout develop
git merge --no-ff release-1.2
git branch -d release-1.2
Create a hotfix branch:
git checkout -b hotfix-1.2.1 master
npm version 1.2.1
Finishing a hotfix branch :
git checkout master
git merge --no-ff hotfix-1.2.1
git tag -a 1.2.1
git checkout develop
git merge --no-ff hotfix-1.2.1
git branch -d hotfix-1.2.1
Create a feature branch:
git checkout -b myfeature develop
Merge feature branch:
git checkout develop
git merge --no-ff myfeature
git branch -d myfeature
git push origin develop
git checkout -b [name_of_your_new_branch]
git fetch
git branch -a
git branch -r
git branch --list
git checkout <branch_name>
git branch -d <branch_name>
git push origin --delete <branch_name>
git fetch --all --prune