Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save rafaelnize/cfdb3290b7dd3e311c0258c021ccd698 to your computer and use it in GitHub Desktop.
Save rafaelnize/cfdb3290b7dd3e311c0258c021ccd698 to your computer and use it in GitHub Desktop.
Delete branches local and remote
To remove a local branch from your machine:
git branch -d {the_local_branch} (use -D instead to force deleting the branch without checking merged status)
To remove a remote branch from the server:
git push origin --delete {the_remote_branch}
@rafaelnize
Copy link
Author

Rename the local branch by typing:

git branch -m <new_name>

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