Skip to content

Instantly share code, notes, and snippets.

@eyalgo
Last active February 4, 2020 10:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save eyalgo/d3f23f88b14ec312f40a to your computer and use it in GitHub Desktop.
Save eyalgo/d3f23f88b14ec312f40a to your computer and use it in GitHub Desktop.
# create a new branch out of current branch
git checkout -b <NEW_FEATURE_BRANCH_NAME>
# share the branch
git push -u origin <BRANCH_NAME>
# show all branches
git remote show origin
# Delete remotely
git push origin :<BRANCH_NAME>
# After removing remotely (in GitHub)
#verify which branches will be pruned
git remote prune origin --dry-run
# actual removing
git remote prune origin
# then delete locally
git branch -d <branch name>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment