unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Pruning dead branches
@ 2022-01-23 18:58 Lars Ingebrigtsen
  2022-01-23 20:58 ` Stefan Kangas
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Lars Ingebrigtsen @ 2022-01-23 18:58 UTC (permalink / raw)
  To: emacs-devel

larsi@giant:~/src/emacs/trunk$ git branch -a | wc -l
229

Many of these are works in progress, of course, or things we're not sure
we're going to merge, but I think many are branches that have been
merged, but just not deleted.

I've got through the list and deleted "my" branches that I'd forgotten
to delete, but could everybody else also do that and see if they've
forgotten branches?

(It's not that this is terribly important, but we should prune a bit
once in a while.)

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Pruning dead branches
  2022-01-23 18:58 Pruning dead branches Lars Ingebrigtsen
@ 2022-01-23 20:58 ` Stefan Kangas
  2022-01-24  9:34   ` Lars Ingebrigtsen
  2022-01-23 23:13 ` Dmitry Gutov
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 8+ messages in thread
From: Stefan Kangas @ 2022-01-23 20:58 UTC (permalink / raw)
  To: Lars Ingebrigtsen, emacs-devel

Lars Ingebrigtsen <larsi@gnus.org> writes:

> I think many are branches that have been
> merged, but just not deleted.

I believe you could list all such branches with:

    git branch --all --merged origin/master



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Pruning dead branches
  2022-01-23 18:58 Pruning dead branches Lars Ingebrigtsen
  2022-01-23 20:58 ` Stefan Kangas
@ 2022-01-23 23:13 ` Dmitry Gutov
  2022-01-24  6:04 ` Phil Sainty
  2022-01-30 16:56 ` Juri Linkov
  3 siblings, 0 replies; 8+ messages in thread
From: Dmitry Gutov @ 2022-01-23 23:13 UTC (permalink / raw)
  To: Lars Ingebrigtsen, emacs-devel

On 23.01.2022 20:58, Lars Ingebrigtsen wrote:
> I've got through the list and deleted "my" branches that I'd forgotten
> to delete, but could everybody else also do that and see if they've
> forgotten branches?

Did so now, thanks for the reminder.



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Pruning dead branches
  2022-01-23 18:58 Pruning dead branches Lars Ingebrigtsen
  2022-01-23 20:58 ` Stefan Kangas
  2022-01-23 23:13 ` Dmitry Gutov
@ 2022-01-24  6:04 ` Phil Sainty
  2022-01-30 16:56 ` Juri Linkov
  3 siblings, 0 replies; 8+ messages in thread
From: Phil Sainty @ 2022-01-24  6:04 UTC (permalink / raw)
  To: emacs-devel

Anyone wanting to have the remote deletions reflected
in their local working copies will need to tell git to
prune those references locally.

Assuming your upstream remote is named "origin", this
will show you what would be deleted locally:

  git fetch --dry-run --prune origin

(Repeat without "--dry-run" to actually do it.)

There's also a --prune-tags option (which must be used
in conjunction with --prune).

Do check the --dry-run first, and see the git-fetch man
page for details, as the pruning feature might not work
the way you expect (especially wrt tags, and/or if you
have multiple remotes configured for the repository).





^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Pruning dead branches
  2022-01-23 20:58 ` Stefan Kangas
@ 2022-01-24  9:34   ` Lars Ingebrigtsen
  0 siblings, 0 replies; 8+ messages in thread
From: Lars Ingebrigtsen @ 2022-01-24  9:34 UTC (permalink / raw)
  To: Stefan Kangas; +Cc: emacs-devel

Stefan Kangas <stefankangas@gmail.com> writes:

> I believe you could list all such branches with:
>
>     git branch --all --merged origin/master

Right, that helps, but I guess many of the older branches haven't been
merged as such (especially the scratch/ ones).

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Pruning dead branches
  2022-01-23 18:58 Pruning dead branches Lars Ingebrigtsen
                   ` (2 preceding siblings ...)
  2022-01-24  6:04 ` Phil Sainty
@ 2022-01-30 16:56 ` Juri Linkov
  2022-01-30 17:43   ` Lars Ingebrigtsen
  3 siblings, 1 reply; 8+ messages in thread
From: Juri Linkov @ 2022-01-30 16:56 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: emacs-devel

> I've got through the list and deleted "my" branches that I'd forgotten
> to delete, but could everybody else also do that and see if they've
> forgotten branches?

I deleted my merged branches.  But for unmerged old branches,
is it ok to move them to old-branches with:

  git push origin origin/name:refs/heads/old-branches/name :name



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Pruning dead branches
  2022-01-30 16:56 ` Juri Linkov
@ 2022-01-30 17:43   ` Lars Ingebrigtsen
  2022-01-30 18:30     ` Eli Zaretskii
  0 siblings, 1 reply; 8+ messages in thread
From: Lars Ingebrigtsen @ 2022-01-30 17:43 UTC (permalink / raw)
  To: Juri Linkov; +Cc: emacs-devel

Juri Linkov <juri@linkov.net> writes:

> I deleted my merged branches.  But for unmerged old branches,
> is it ok to move them to old-branches with:
>
>   git push origin origin/name:refs/heads/old-branches/name :name

If the code is never going to be merged, then deleting the branches
would be best, I think?  But I have no strong opinion here.  Eli?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Pruning dead branches
  2022-01-30 17:43   ` Lars Ingebrigtsen
@ 2022-01-30 18:30     ` Eli Zaretskii
  0 siblings, 0 replies; 8+ messages in thread
From: Eli Zaretskii @ 2022-01-30 18:30 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: emacs-devel, juri

> From: Lars Ingebrigtsen <larsi@gnus.org>
> Date: Sun, 30 Jan 2022 18:43:33 +0100
> Cc: emacs-devel@gnu.org
> 
> Juri Linkov <juri@linkov.net> writes:
> 
> > I deleted my merged branches.  But for unmerged old branches,
> > is it ok to move them to old-branches with:
> >
> >   git push origin origin/name:refs/heads/old-branches/name :name
> 
> If the code is never going to be merged, then deleting the branches
> would be best, I think?  But I have no strong opinion here.  Eli?

Yes, we should not keep old branches that have no value.  If they do
have some value, I see no reason to rearrange them -- just leave them
alone.

(Perhaps we should have some etc/BRANCHES file with short descriptions
of the branches we want to keep indefinitely.)



^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2022-01-30 18:30 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-01-23 18:58 Pruning dead branches Lars Ingebrigtsen
2022-01-23 20:58 ` Stefan Kangas
2022-01-24  9:34   ` Lars Ingebrigtsen
2022-01-23 23:13 ` Dmitry Gutov
2022-01-24  6:04 ` Phil Sainty
2022-01-30 16:56 ` Juri Linkov
2022-01-30 17:43   ` Lars Ingebrigtsen
2022-01-30 18:30     ` Eli Zaretskii

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.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).