<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <title>fence (fence)</title>
    <link>https://ruby-china.org/fence</link>
    <description></description>
    <language>en-us</language>
    <item>
      <title>Git 已被其他开发删除的远程分支,本地依旧显示,如何删除?</title>
      <description>&lt;p&gt;hi all:
如何让已经失效的远程 branch-name 在执行 &lt;code&gt;git branch -a&lt;/code&gt; 的时候不再展示？&lt;/p&gt;

&lt;p&gt;有同事 push 了一个 git 分支，并且被我给 pull 到本地了&lt;/p&gt;

&lt;p&gt;同事在自己机器上执行了
&lt;code&gt;git branch -d branch-name&lt;/code&gt;
&lt;code&gt;git push origin :branch-name&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;我在自己机器执行
&lt;code&gt;git branch -d branch-name&lt;/code&gt;    //ok
&lt;code&gt;git push origin :branch-name&lt;/code&gt;  //提示：&lt;/p&gt;

&lt;p&gt;error: unable to delete 'branch-name': remote ref does not exist
error: 无法推送一些引用到 'git@gitserver:phplib'&lt;/p&gt;

&lt;p&gt;大家帮忙想想办法让已经失效的远程 branch-name 在执行 &lt;code&gt;git branch -a&lt;/code&gt; 的时候不再展示吧？谢谢&lt;/p&gt;</description>
      <author>fence</author>
      <pubDate>Fri, 27 Feb 2015 10:23:34 +0800</pubDate>
      <link>https://ruby-china.org/topics/24360</link>
      <guid>https://ruby-china.org/topics/24360</guid>
    </item>
  </channel>
</rss>
