Re: How can I remove a remote branch from local repo that is removed at the server side

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2009.05.12 09:56:51 +0300, Yakup Akbay wrote:
> Hi,
>
> consider the following situation:
>
>    adg@adghp:~/myrepo$ git branch -a
>    * master
>      origin/HEAD
>      origin/master
>      origin/work
>
> I want to remove origin/work from my local repository which is no more  
> existing at the origin. git fetch (or pull) does not help either.  
> However, it disappears when I remove the following line in  
> .git/packed-refs file:
>
>    021a032317425b136b5430c7dead94328996b9d0 refs/remotes/origin/work
>
> Is there command line version to do it?

To manually delete the remote tracking branch:
	git branch -r -d origin/work

To prune all remote tracking branches for "origin" for which the
corresponding branch on the remote is gone:
	git remote prune origin

Björn
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]