zoukankan      html  css  js  c++  java
  • 删除远程分支 error: unable to delete 'origin/rewrite_multiframe': remote ref does not exist

    https://stackoverflow.com/questions/35941566/git-says-remote-ref-does-not-exist-when-i-delete-remote-branch/35941658

    The command git branch -a shows remote branches that exist in your local repository. This may sound a bit confusing but to understand it, you have to understand that there is a difference between a remote branch, and a branch that exists in a remote repository. Remote branches are local branches that map to branches of the remote repository. So the set of remote branches represent the state of the remote repository.

    The usual way to update the list of remote branches is to use git fetch. This automatically gets an updated list of branches from the remote and sets up remote branches in the local repository, also fetching any commit objects you may be missing.

    However, by default, git fetch does not remove remote branches that no longer have a counterpart branch on the remote. In order to do that, you explicitly need to prune the list of remote branches:

    git fetch --prune
    This will automatically get rid of remote branches that no longer exist on the remote. Afterwards, git branch -r will show you an updated list of branches that really exist on the remote: And those you can delete using git push.

    That being said, in order to use git push --delete, you need to specify the name of the branch on the remote repository; not the name of your remote branch. So to delete the branch test (represented by your remote branch origin/test), you would use git push origin --delete test.

    更新远程分支列表
    删除远程分支时不要加 origin/
    you need to specify the name of the branch on the remote repository; not the name of your remote branch.

  • 相关阅读:
    iOS获取系统时间
    iOS面试-assign与retain
    iOS-检测网络可连接性
    iOS-ASI异步下载图片
    iOS-NSString值为Unicode格式(字符串编码转换成中文编码)
    iOS-模态视图动画
    iOS-UIScrollView滚动视图(转)
    iOS-NSFileManager
    iOS-self.用法
    iOS-iphone网络编程总结
  • 原文地址:https://www.cnblogs.com/walnuttree/p/11448529.html
Copyright © 2011-2022 走看看