How do I delete a local branch on Github Desktop?

后端 未结 7 643
南旧
南旧 2021-02-01 00:14

Last week I upgraded my Windows Github to Github Desktop.

It is certainly a lot faster than that last update they made for Github Windows. It also has a nice little visu

7条回答
  •  不思量自难忘°
    2021-02-01 01:05

    Sometimes I have a strange behaviour with GitHub Desktop: when I delete a branch in GitHub Shell, the branch continues to shown into the drop-down menù of GitHub Desktop! ... same behaviour with the "Delete branch-name..." function of GitHub Desktop.

    I solved with git show-refto list all refs

    cf7c75b18e47a566f5bebccd3746f19fa426af4f refs/heads/master
    cf7c75b18e47a566f5bebccd3746f19fa426af4f refs/remotes/origin/HEAD
    540b3c8032f76ec13c84d6f40de885b996465dcb refs/remotes/origin/branch1
    cf7c75b18e47a566f5bebccd3746f19fa426af4f refs/remotes/origin/branch2
    

    when there are the ref to remote, GitHub Desktop can't delete at all the branch.

    You can't remove a ref with git update-ref -d refs/remotes/origin/branch* and then you have

    cf7c75b18e47a566f5bebccd3746f19fa426af4f refs/heads/master
    cf7c75b18e47a566f5bebccd3746f19fa426af4f refs/remotes/origin/HEAD
    

    Now you can remove the branc with git branch -d branch*

提交回复
热议问题