John McKown <> writes:

> On Tue, Mar 8, 2016 at 4:32 AM, Jagadeesh N. Malakannavar <
>> 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!".

I'd make the change on one branch, then swap branch and cherry-pick it
over, then swap to the next and cherry-pick, and so on...


Magnus Therning              OpenPGP: 0x927912051716CE39
email:   jabber:
twitter: magthe     

If voting could really change things it would be illegal.

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 
For more options, visit

Attachment: signature.asc
Description: PGP signature

Reply via email to