On Tue, Mar 8, 2016 at 4:32 AM, Jagadeesh N. Malakannavar <
mnjagade...@gmail.com> 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
git branch | awk '{print $NF;}'|\
while read branch;do​

    ​git checkout ${branch} || break #stop loop on error
    git add ???
    git commit -m '?????'
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