From: "Philip Oakley" <philipoakley@iee.org>
To: "Junio C Hamano" <gitster@pobox.com>,
"Jens Hausherr" <Jens.Hausherr@xing.com>
Cc: <git@vger.kernel.org>
Subject: Re: Deletion of remote branches
Date: Mon, 1 Oct 2012 21:12:10 +0100 [thread overview]
Message-ID: <583784AD1BE54FD582B1D58FE7F4CADA@PhilipOakley> (raw)
In-Reply-To: <7v1uhids5a.fsf@alter.siamese.dyndns.org>
From: "Junio C Hamano" <gitster@pobox.com>
> Jens Hausherr <Jens.Hausherr@xing.com> writes:
>
>> I came across an issue with deleting remote branches: When deleting a
>> branch using "git branch r d <branch>" the branch is deleted and no
>> longer shown by "git branch r".
>>
>> "git ls-remote --heads" on the other hand still lists the ref for the
>> last
>> branch commit.
>>
>> If I delete the branch using "git push origin :<branch>" the branch
>> is
>> removed completely (i.e. git ls-remote no longer returns a ref).
>
> All of the above are expected and working as designed. Remote
> tracking branches are local _copies_ of what you have over there at
> the remote repository. The latter is the authoritative version, and
> you asked "ls-remote" to go over the network to view them.
>
Is there a definitive naming convention for the two types of 'remote
branch'?
IIRC (somewhere) the 'tracking' term was to be deprecated, though it is
still in common use. It is usually only the context that clarifies if it
is the local or the distant copy/repo.
Distinct names make for less confusion.
> If you are trying to remove the branches you show to others and
> yourself who are observing that remote repository from your local
> workstation, you can first "git push origin :<branch>" to remove it
> in the remote repository. You can run your next fetch with "--prune"
> to get rid of remotes/origin/<branch>, I think.
>
Philip
next prev parent reply other threads:[~2012-10-01 20:12 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-01 13:22 Jens Hausherr
2012-10-01 17:22 ` Junio C Hamano
2012-10-01 20:12 ` Philip Oakley [this message]
2012-10-01 20:42 ` Junio C Hamano
2012-10-02 6:57 ` Jens Hausherr
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=583784AD1BE54FD582B1D58FE7F4CADA@PhilipOakley \
--to=philipoakley@iee.org \
--cc=Jens.Hausherr@xing.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this inbox:
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).