Re: [git-users] To know the string in which branch

2013-02-21 Thread John McKown
As Larry Wall said "Tim Toady" (TMTOWTDI ), aka "There's More Than One Way To Do It". Which ever makes more sense to the programmer / user. I do admit to often using esoteric methods. On Thu, Feb 21, 2013 at 1:49 PM, Dale R. Worley wrote: > > From: John McKown > > > > git branch | awk '{print

Re: [git-users] To know the string in which branch

2013-02-21 Thread Dale R. Worley
> From: John McKown > > git branch | awk '{print $NF;}' | xargs -l git grep "foo" Or (which is easier to generalize): for BRANCH in $( git branch | cut -c 3- ) ; do git grep "foo" $BRANCH ; done Dale -- You received this message because you are subscribed to the Google Groups "Git for human

Re: [git-users] To know the string in which branch

2013-02-21 Thread John McKown
git grep is the answer. Once for each branch name: git grep "foo" master git grep "foo" maint git grep "foo" temp Assuming that there are three branches called: master, maint, and temp. If you want an "easier" (but not "simpler") way to scan all branches, then on a UNIX system (I don't know Wind

Re: [git-users] To know the string in which branch

2013-02-21 Thread Dale R. Worley
> From: William Seiti Mizuta > > You can use "git grep string branch" to check if the string exists in the > branch. I think the question is, "How do you determine which branch contains a file that contains ?" Dale -- You received this message because you are subscribed to the Google Groups "

Re: [git-users] To know the string in which branch

2013-02-21 Thread William Seiti Mizuta
You can use "git grep string branch" to check if the string exists in the branch. William Seiti Mizuta @williammizuta Caelum | Ensino e Inovação www.caelum.com.br On Thu, Feb 21, 2013 at 4:35 AM, lei yang wrote: > Hi expert, > > Is there a git command to know string "foo" contains in which br

[git-users] To know the string in which branch

2013-02-20 Thread lei yang
Hi expert, Is there a git command to know string "foo" contains in which branch? Lei -- You received this message because you are subscribed to the Google Groups "Git for human beings" group. To unsubscribe from this group and stop receiving emails from it, send an email to git-users+unsubscr