Yes it is Linux. I used python script similar to your shell script and got 
it done. Thanks for your inputs.

Thanks

On Tuesday, 8 March 2016 18:52:22 UTC+5:30, John McKown wrote:
>
> On Tue, Mar 8, 2016 at 4:32 AM, Jagadeesh N. Malakannavar <
> mnjag...@gmail.com <javascript:>> wrote:
>
>> Hi,
>> I have bunch of branches in a repo. I want to push some file like 
>> '.travis.yaml' into each branch. Any idea how to do it?
>>
>> Thanks
>>
>
> ​What OS? I'm a Linux user (almost no Windows except at work). I'd 
> probably do something like:
>
> current=$(git branch|awk '$1=="*" {print $2;}') #currently checked out 
> branch
> git branch | awk '{print $NF;}'|\
> while read branch;do​
>  
>     ​git checkout ${branch} || break #stop loop on error
>     git add ???
>     git commit -m '?????'
> done
> git checkout ${current}
>
> I had the loop abort if there there is some problem doing a checkout. If 
> you're using OSX, the above will likely work. If you are using Windows, 
> "you're on your own!".
>
>
>
>
> -- 
> A fail-safe circuit will destroy others. -- Klipstein
>
> Maranatha! <><
> John McKown
>

-- 
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...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to