📘
Git-Help
Git Cheatsheet
  • A Simple Git Help
  • Basics
  • Git Branching
  • Pull Request
  • Submodules
  • Commands / Actions
    • Commit changes to other branch
    • git log
    • git status
    • git init
    • Amend a commit
    • Reset a file or full
    • Undo git add
    • Get remote repo url
    • Add or Set Remote URL
    • delete branch
  • Credits & Other
    • Other good links
    • Credits
Powered by GitBook
On this page

Was this helpful?

  1. Commands / Actions

delete branch

PreviousAdd or Set Remote URLNextOther good links

Last updated 2 years ago

Was this helpful?

To delete a local branch

# To delete local branch (which is not there in server)

$ git branch -d <branchname>

To delete a remote branch

# To Delete Remote branch

$ git push -d <remote_name> <branchname>
$ git push -d origin <branchname>

https://stackoverflow.com/questions/2003505/how-do-i-delete-a-git-branch-locally-and-remotely