Skip to content

Instantly share code, notes, and snippets.

@samredai
Created December 17, 2018 15:47
Show Gist options
  • Save samredai/f9d16df95c1964cf7c89f726244b1c1f to your computer and use it in GitHub Desktop.
Save samredai/f9d16df95c1964cf7c89f726244b1c1f to your computer and use it in GitHub Desktop.
Git: Merge a dev branch to master then delete that branch both locally and remotely
#Checkout the master branch
git checkout master
#Merge the dev branch into the master branch
git merge dev
#Push the new merged master branch
git push
#Delete the dev branch locally
git branch -d dev
#Delete the dev branch remotely
git push origin :dev
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment