Skip to content

Instantly share code, notes, and snippets.

@mildronize
Last active November 18, 2020 01:48
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 mildronize/a0033b3f475eb35a5fbc5c73772d7372 to your computer and use it in GitHub Desktop.
Save mildronize/a0033b3f475eb35a5fbc5c73772d7372 to your computer and use it in GitHub Desktop.
Git cheat sheet

Deleting local branches

git branch -a
# *master
#  test
#  remote/origin/master
#  remote/origin/test

git branch -d test
# Deleted branch test (was ########).

Deleting Remote branches

git branch -a
# *master
#  test
#  remote/origin/master
#  remote/origin/test

git push origin --delete test
# To <URL of your repository>.git
#  - [deleted]         test

https://www.hostinger.com/tutorials/how-to-rename-a-git-branch/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment