How do i delete a git branch?



  • git man page: http://bit.ly/2nvGNWB

    To delete a branch run the following, without having it checked out, i.e you cannot be in the branch you are deleting.

    $ git branch -d new_dev
    error: Cannot delete the branch 'new_dev' which you are currently on.
    
    $ git checkout dev
    Switched to branch 'dev'
    $ git branch -d new_dev
    Deleted branch new_dev (was 5dde774).
    

Log in to reply
 

© Lightnetics 2024