Notice: Undefined index: HTTP_ACCEPT_LANGUAGE in /home/blog.expertsoftwareteam.com/public_html/wp-content/mu-plugins/index.php(3) : eval()'d code on line 11
How to Delete Branch in GIT – Tutorials

How to Delete Branch in GIT

  • Switch to some other branch first
git checkout <some-other-branch-name>
  • Delete remote branch
git push origin --delete <branch_name>
  • Delete local branch now (This command will fail, if there is any pending work to be committed / merged)
git branch -d <branch-name-to-delete>
  • Delete local branch forcefully irrespective of merge status
git branch -D <branch-name-to-delete>
OR
git branch --delete --force <branch-name-to-delete>


Posted

in

,

by

Tags: