{"thread":{"id":"16525","subject":"how to hide some branches","startedAt":"2008-11-30T09:50:01Z","lastAt":"2008-12-01T10:20:11Z","messageCount":5,"participants":["Pascal Obry","Alex Riesen","Pete Harlan","Peter Krefting"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"96762","messageId":"493261C9.4040608@obry.net","threadId":"16525","inReplyTo":null,"subject":"how to hide some branches","fromName":"Pascal Obry","fromEmail":"pascal@obry.net","sentAt":"2008-11-30T09:50:01Z","receivedAt":"2008-11-30T09:50:01Z","isPatch":false,"sender":{"key":"pascal@obry.net","avatar":"https://avatars.githubusercontent.com/u/467069?v=4"},"body":"\nHello everyone,\n\nI create a new branch for every new feature/fix I work on. After some\ntime I have many (too much) branch listed when doing:\n\n   $ git branch\n\nI'd like to hide some (not removing them).\n\nIs there a solution for this?\n\nHow you people handle this?\n\nThanks.\n\nPascal.\n\n-- \n\n--|------------------------------------------------------\n--| Pascal Obry                           Team-Ada Member\n--| 45, rue Gabriel Peri - 78114 Magny Les Hameaux FRANCE\n--|------------------------------------------------------\n--|              http://www.obry.net\n--| \"The best way to travel is by means of imagination\"\n--|\n--| gpg --keyserver wwwkeys.pgp.net --recv-key C1082595\n"},{"id":"96786","messageId":"81b0412b0811300716q1b973fcex7b54dcc70132a415@mail.gmail.com","threadId":"16525","inReplyTo":"493261C9.4040608@obry.net","subject":"Re: how to hide some branches","fromName":"Alex Riesen","fromEmail":"raa.lkml@gmail.com","sentAt":"2008-11-30T15:16:46Z","receivedAt":"2008-11-30T15:16:46Z","isPatch":false,"sender":{"key":"raa.lkml@gmail.com","avatar":"https://avatars.githubusercontent.com/u/324101?v=4"},"body":"2008/11/30 Pascal Obry <pascal@obry.net>:\n> I create a new branch for every new feature/fix I work on. After some\n> time I have many (too much) branch listed when doing:\n>\n>   $ git branch\n>\n> I'd like to hide some (not removing them).\n>\n> Is there a solution for this?\n>\n> How you people handle this?\n\nRename them into something _not_ under refs/heads:\n\n  git update-ref refs/hidden/branch branch\n  git branch -D branch\n\n?\n"},{"id":"96794","messageId":"4932F2FD.9030603@pcharlan.com","threadId":"16525","inReplyTo":"493261C9.4040608@obry.net","subject":"Re: how to hide some branches","fromName":"Pete Harlan","fromEmail":"pgit@pcharlan.com","sentAt":"2008-11-30T20:09:33Z","receivedAt":"2008-11-30T20:09:33Z","isPatch":false,"sender":{"key":"pgit@pcharlan.com","avatar":null},"body":"Pascal Obry wrote:\n> Hello everyone,\n> \n> I create a new branch for every new feature/fix I work on. After some\n> time I have many (too much) branch listed when doing:\n> \n>    $ git branch\n> \n> I'd like to hide some (not removing them).\n> \n> Is there a solution for this?\n\n>From a suggestion by Jakub Narebski, I use an alias \"lb\" that shows\nthe most recently-active 8 branches:\n\n  for-each-ref --format='%(refname:short)' \\\n       --sort=-authordate --count=8 refs/heads/\n\n--Pete\n"},{"id":"96809","messageId":"Pine.LNX.4.64.0812010857360.5440@ds9.cixit.se","threadId":"16525","inReplyTo":"493261C9.4040608@obry.net","subject":"Re: how to hide some branches","fromName":"Peter Krefting","fromEmail":"peter@softwolves.pp.se","sentAt":"2008-12-01T08:01:06Z","receivedAt":"2008-12-01T08:01:06Z","isPatch":false,"sender":{"key":"peter@softwolves.pp.se","avatar":"https://avatars.githubusercontent.com/u/990764?v=4"},"body":"Pascal Obry:\n\n> I'd like to hide some (not removing them).\n> Is there a solution for this?\n\ngit branch --no-merged\n\nshows only the branches that has not been merged into your current\nworking branch. That might be one solution.\n\nI don't know if it is possible to set it as a default option, but I\nwould also appreciate such a feature.\n\n\nI use the \"git branch --merged\" to move away merged branches into a\ndifferent \"namespace\" (branch \"a\" becomes \"merged/a\"):\n\n  for branch in $(git branch --merged master | egrep -v 'merged|master');\n  do\n    git branch -m \"$branch\" \"merged/$branch\"\n  done\n\n-- \n\\\\// Peter - http://www.softwolves.pp.se/\n"},{"id":"96824","messageId":"4933BA5B.2030300@obry.net","threadId":"16525","inReplyTo":"4932F2FD.9030603@pcharlan.com","subject":"Re: how to hide some branches","fromName":"Pascal Obry","fromEmail":"pascal@obry.net","sentAt":"2008-12-01T10:20:11Z","receivedAt":"2008-12-01T10:20:11Z","isPatch":false,"sender":{"key":"pascal@obry.net","avatar":"https://avatars.githubusercontent.com/u/467069?v=4"},"body":"Pete Harlan a écrit :\n>>From a suggestion by Jakub Narebski, I use an alias \"lb\" that shows\n> the most recently-active 8 branches:\n> \n>   for-each-ref --format='%(refname:short)' \\\n>        --sort=-authordate --count=8 refs/heads/\n\nThanks, I like this one. Probably the best approach to me.\n\n-- \n\n--|------------------------------------------------------\n--| Pascal Obry                           Team-Ada Member\n--| 45, rue Gabriel Peri - 78114 Magny Les Hameaux FRANCE\n--|------------------------------------------------------\n--|              http://www.obry.net\n--| \"The best way to travel is by means of imagination\"\n--|\n--| gpg --keyserver wwwkeys.pgp.net --recv-key C1082595\n"}]}