Git merge current branch into master and delete branch

Programming

18 Aug 2015

Git merge current branch into master and delete branch

Preston Garrison 0 Comments

Once you have decided your branch bug fix is working, you will then want to merge it back into the master branch. Make sure you are on the branch currently you wish to merge in, then run the following commands replacing branch_name with the name of the branch you are on.

 

git branch
git commit -a
git push
git push --set-upstream origin branch_name
git checkout master
git pull origin master
git merge branch_name
git push origin master
git push origin --delete branch_name
git branch -D branch_name

 

Preston Garrison