git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* how to hide some branches
@ 2008-11-30  9:50 Pascal Obry
  2008-11-30 15:16 ` Alex Riesen
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Pascal Obry @ 2008-11-30  9:50 UTC (permalink / raw)
  To: git list


Hello everyone,

I create a new branch for every new feature/fix I work on. After some
time I have many (too much) branch listed when doing:

   $ git branch

I'd like to hide some (not removing them).

Is there a solution for this?

How you people handle this?

Thanks.

Pascal.

-- 

--|------------------------------------------------------
--| Pascal Obry                           Team-Ada Member
--| 45, rue Gabriel Peri - 78114 Magny Les Hameaux FRANCE
--|------------------------------------------------------
--|              http://www.obry.net
--| "The best way to travel is by means of imagination"
--|
--| gpg --keyserver wwwkeys.pgp.net --recv-key C1082595

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

* Re: how to hide some branches
  2008-11-30  9:50 how to hide some branches Pascal Obry
@ 2008-11-30 15:16 ` Alex Riesen
  2008-11-30 20:09 ` Pete Harlan
  2008-12-01  8:01 ` Peter Krefting
  2 siblings, 0 replies; 5+ messages in thread
From: Alex Riesen @ 2008-11-30 15:16 UTC (permalink / raw)
  To: pascal; +Cc: git list

2008/11/30 Pascal Obry <pascal@obry.net>:
> I create a new branch for every new feature/fix I work on. After some
> time I have many (too much) branch listed when doing:
>
>   $ git branch
>
> I'd like to hide some (not removing them).
>
> Is there a solution for this?
>
> How you people handle this?

Rename them into something _not_ under refs/heads:

  git update-ref refs/hidden/branch branch
  git branch -D branch

?

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

* Re: how to hide some branches
  2008-11-30  9:50 how to hide some branches Pascal Obry
  2008-11-30 15:16 ` Alex Riesen
@ 2008-11-30 20:09 ` Pete Harlan
  2008-12-01 10:20   ` Pascal Obry
  2008-12-01  8:01 ` Peter Krefting
  2 siblings, 1 reply; 5+ messages in thread
From: Pete Harlan @ 2008-11-30 20:09 UTC (permalink / raw)
  To: pascal; +Cc: git list

Pascal Obry wrote:
> Hello everyone,
> 
> I create a new branch for every new feature/fix I work on. After some
> time I have many (too much) branch listed when doing:
> 
>    $ git branch
> 
> I'd like to hide some (not removing them).
> 
> Is there a solution for this?

>From a suggestion by Jakub Narebski, I use an alias "lb" that shows
the most recently-active 8 branches:

  for-each-ref --format='%(refname:short)' \
       --sort=-authordate --count=8 refs/heads/

--Pete

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

* Re: how to hide some branches
  2008-11-30  9:50 how to hide some branches Pascal Obry
  2008-11-30 15:16 ` Alex Riesen
  2008-11-30 20:09 ` Pete Harlan
@ 2008-12-01  8:01 ` Peter Krefting
  2 siblings, 0 replies; 5+ messages in thread
From: Peter Krefting @ 2008-12-01  8:01 UTC (permalink / raw)
  To: Pascal Obry; +Cc: git list

Pascal Obry:

> I'd like to hide some (not removing them).
> Is there a solution for this?

git branch --no-merged

shows only the branches that has not been merged into your current
working branch. That might be one solution.

I don't know if it is possible to set it as a default option, but I
would also appreciate such a feature.


I use the "git branch --merged" to move away merged branches into a
different "namespace" (branch "a" becomes "merged/a"):

  for branch in $(git branch --merged master | egrep -v 'merged|master');
  do
    git branch -m "$branch" "merged/$branch"
  done

-- 
\\// Peter - http://www.softwolves.pp.se/

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

* Re: how to hide some branches
  2008-11-30 20:09 ` Pete Harlan
@ 2008-12-01 10:20   ` Pascal Obry
  0 siblings, 0 replies; 5+ messages in thread
From: Pascal Obry @ 2008-12-01 10:20 UTC (permalink / raw)
  To: Pete Harlan; +Cc: git list

Pete Harlan a écrit :
>>From a suggestion by Jakub Narebski, I use an alias "lb" that shows
> the most recently-active 8 branches:
> 
>   for-each-ref --format='%(refname:short)' \
>        --sort=-authordate --count=8 refs/heads/

Thanks, I like this one. Probably the best approach to me.

-- 

--|------------------------------------------------------
--| Pascal Obry                           Team-Ada Member
--| 45, rue Gabriel Peri - 78114 Magny Les Hameaux FRANCE
--|------------------------------------------------------
--|              http://www.obry.net
--| "The best way to travel is by means of imagination"
--|
--| gpg --keyserver wwwkeys.pgp.net --recv-key C1082595

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

end of thread, other threads:[~2008-12-01 10:21 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-11-30  9:50 how to hide some branches Pascal Obry
2008-11-30 15:16 ` Alex Riesen
2008-11-30 20:09 ` Pete Harlan
2008-12-01 10:20   ` Pascal Obry
2008-12-01  8:01 ` Peter Krefting

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).