git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Paul Smith <paul@mad-scientist.net>
To: Reda Lyazidi <reda.lyazidiprojet@gmail.com>, git@vger.kernel.org
Subject: Re: Git Strange behaviour with remote deleted branch
Date: Mon, 19 Jun 2017 17:46:22 -0400	[thread overview]
Message-ID: <1497908782.6463.8.camel@mad-scientist.net> (raw)
In-Reply-To: <39331ce5-dbf9-170e-e550-784db10b966f@gmail.com>

On Mon, 2017-06-19 at 23:33 +0200, Reda Lyazidi wrote:
> with git I noticed when I removed a remote branch with git push origin 
> --delete <the branch>
> in my clone when I used git branch -a I don't the deleted branch
> but my colleagues still see it.
> 
> I tried with two clones in my PC, with the first one delete branch and 
> the other still sees it
> despite git pull .

Normally Git will not remove a remote's branch refs on a fetch (or
pull) operation.  This is a safety measure, since you might still have
a use for that branch (for example to run diff against or similar).

In order to remove branches that have been deleted in your remote, you
must use the --prune (or -p) option to git fetch or git pull:

  git pull -p

will get rid of them.


  reply	other threads:[~2017-06-19 22:14 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-19 21:33 Git Strange behaviour with remote deleted branch Reda Lyazidi
2017-06-19 21:46 ` Paul Smith [this message]
2017-06-20 16:20   ` Jeff King

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1497908782.6463.8.camel@mad-scientist.net \
    --to=paul@mad-scientist.net \
    --cc=git@vger.kernel.org \
    --cc=reda.lyazidiprojet@gmail.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.
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 NNTP newsgroup(s).