From: Eric Sunshine Date: Fri, 09 Feb 2018 05:26:27 GMT Subject: Re: [PATCH v2 12/17] git fetch doc: add a new section to explain the ins & outs of pruning Message-ID: In-Reply-To: <20180208161936.8196-13-avarab@gmail.com> On Thu, Feb 8, 2018 at 11:19 AM, Ævar Arnfjörð Bjarmason wrote: > Add a new section to canonically explain how remote reference pruning > works, and how users should be careful about using it in conjunction > with tag refspecs in particular. > [...] > Signed-off-by: Ævar Arnfjörð Bjarmason > --- > diff --git a/Documentation/git-fetch.txt b/Documentation/git-fetch.txt > @@ -99,6 +99,55 @@ The latter use of the `remote..fetch` values can be > +PRUNING > +------- > +[...] > +If left to accumulate, these stale references might make performance > +worse on big and busy repos that have a lot of branch churn, and > +e.g. make the output of commands like `git branch -a --contains > +` needlessly verbose, as well as impacting anything else > +that'll work with the complete set of known references. > + > +These remote tracking references can be deleted as a one-off with I think we call these "remote-tracking" (note the hyphen), which are local but track something remote, rather than "remote tracking" (no hyphen) which would themselves be remote. > +either of: > + > +------------------------------------------------ > +# While fetching > +$ git fetch --prune > + > +# Only prune, don't fetch > +$ git remote prune > +------------------------------------------------ > + > +To prune references as part of your normal workflow without needing to > +remember to run that set `fetch.prune` globally, or s/that/&,/ > +`remote..prune` per-remote in the config. See > +linkgit:git-config[1].