# Deleting remote branches

2 messages from 2010-06-19 to 2010-06-20. Participants: jhapk, Jon Seymour.
Thread: https://gitlist.dev/t/24153

## jhapk, 2010-06-19 18:17

Subject: Deleting remote branches
Message-ID: <1276971471250-5199192.post@n2.nabble.com>
URL: https://gitlist.dev/e/1276971471250-5199192.post%40n2.nabble.com

```

Hi,

I added a remote called PCM to my repository. So when I do a 
$git branch -a

It shows me all the branches of the remote. I decided I don't want the
remote anymore, so I deleted it from my .git/config file and did
$git remote update

The first command verified that PCM is not a remote anymore, but still when
I do a $git branch -a,  I see all the branches of PCM.

How do I get rid of it?

Thanks
 
-- 
View this message in context: http://git.661346.n2.nabble.com/Deleting-remote-branches-tp5199192p5199192.html
Sent from the git mailing list archive at Nabble.com.

```

## Jon Seymour, 2010-06-20 04:49

Subject: Re: Deleting remote branches
Message-ID: <AANLkTimjVoRBDxRyfOcDc2SGacSReL9VdN8vhPGIdZ5b@mail.gmail.com>
URL: https://gitlist.dev/e/AANLkTimjVoRBDxRyfOcDc2SGacSReL9VdN8vhPGIdZ5b%40mail.gmail.com
In-Reply-To: <1276971471250-5199192.post@n2.nabble.com>

```
You probably should have used git remote rm PCM which will maintain
the consistency between .git/config and .git/refs/remotes

Probably easiest thing to do would be to add a remote called PCM back,
then remove it with git remote rm PCM.

jon.

On Sun, Jun 20, 2010 at 4:17 AM, jhapk <pradeep.kumar.jha@gmail.com> wrote:
>
> Hi,
>
> I added a remote called PCM to my repository. So when I do a
> $git branch -a
>
> It shows me all the branches of the remote. I decided I don't want the
> remote anymore, so I deleted it from my .git/config file and did
> $git remote update
>
> The first command verified that PCM is not a remote anymore, but still when
> I do a $git branch -a,  I see all the branches of PCM.
>
> How do I get rid of it?
>
> Thanks
>
> --
> View this message in context: http://git.661346.n2.nabble.com/Deleting-remote-branches-tp5199192p5199192.html
> Sent from the git mailing list archive at Nabble.com.
> --
> To unsubscribe from this list: send the line "unsubscribe git" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>

```
