How do I delete a remote branch

1,115 views
Skip to first unread message

Jasper

unread,
Jun 6, 2010, 1:16:43 PM6/6/10
to tortoisegit-users
I was looking for a way, but wasn't able to find an answer to do it.
I did find a brief release note that the functionality had been added
to TortoiseGit, an issue marked as invalid in which someone asked this
same question (and was given a link to the FAQ, which simply does not
answer the question) and a superuser question with only answers about
how to do it from the commandline.

So now I'm asking here, does anybody here know how to remove a remote
branch using TortoiseGit?

Jasper

Jacob Christ

unread,
Jun 6, 2010, 2:51:58 PM6/6/10
to tortoise...@googlegroups.com
Hmm,  I don't know how to do it using tgit, but what I would do on the server is delete any references to the branch then do a git prune.



--
You received this message because you are subscribed to the Google Groups "tortoisegit-users" group.
To post to this group, send email to tortoise...@googlegroups.com.
To unsubscribe from this group, send email to tortoisegit-us...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/tortoisegit-users?hl=en.



Frank Li

unread,
Jun 7, 2010, 7:56:25 AM6/7/10
to tortoise...@googlegroups.com
Press "Shift" key, right-click -> Browse Reference, Choose branch or
tag, right-click, choose "delete"..
Or open log dialog -> choose commit with branch\tag, right->click->delete


2010/6/7 Jacob Christ <ja...@pontech.com>:

Jasper Horn

unread,
Jun 7, 2010, 8:04:28 AM6/7/10
to tortoise...@googlegroups.com
Frank Li wrote:
> Press "Shift" key, right-click -> Browse Reference, Choose branch or
> tag, right-click, choose "delete"..
> Or open log dialog -> choose commit with branch\tag, right->click->delete

That removes the branch from my local repository - but not from any
remote repository, which is what I was talking about.

Jasper

Frank Li

unread,
Jun 7, 2010, 8:06:25 AM6/7/10
to tortoise...@googlegroups.com
if you choose origin/xxxx, it will delete remote branch.

2010/6/7 Jasper Horn <jaspe...@gmail.com>:

Jacob Christ

unread,
Jun 7, 2010, 10:45:50 AM6/7/10
to tortoise...@googlegroups.com
Frank,

Does that do a prune on the remote too?

Jacob

Frank Li

unread,
Jun 7, 2010, 9:43:35 PM6/7/10
to tortoise...@googlegroups.com
2010/6/7 Jacob Christ <ja...@pontech.com>:

> Frank,
> Does that do a prune on the remote too?
> Jacob

It actual use "git push :branch" to delete remote branch, which is
standard git command. I am not sure what to do by git.
I think git remove reference at least.

Jasper Horn

unread,
Jun 17, 2010, 2:46:29 PM6/17/10
to tortoise...@googlegroups.com
Frank Li wrote:
> if you choose origin/xxxx, it will delete remote branch.

I'm sorry for not getting back to you sooner. The problem is that
there are no "origin/" branches.
So I would have to do a "git fetch origin", which I see can be done
through the browse refs screen. However, I can only see this in a
newly cloned repository, not in the one I was working on. In my
original repository, in the browse refs screen, there wasn't even a
"remotes" entry.
This is because I never cloned the repository, but simply created two
empty repositories and started pushing.

Do note that this problem stretches beyond "non-cloned repositories",
I have tried, and I run into the same problem when creating any other
repository through the "manage repositories screen".
Do also note that this problem stretches beyond "deleting branches as
well" - as far as I can see there is no way for me to pull a branch
that I haven't made myself.

The problem comes down to: repositories made through the manage
repositories screen don't show up in the browse refs screen, as such
there is no way to do a "git pull remote". Logically this is cause by
the fact that there are no known refs on the remote.

Jasper Horn

Jasper Horn

unread,
Jun 17, 2010, 2:53:56 PM6/17/10
to tortoise...@googlegroups.com
I wrote:
> The problem comes down to: repositories made through the manage
> repositories screen don't show up in the browse refs screen, as such
> there is no way to do a "git pull remote".

Never mind all that, I just found that there is a way: through the git
sync option. I think it is still a bit obscure how to do this, but I
guess I don't have a better alternative either.

Jasper Horn

Reply all
Reply to author
Forward
0 new messages