Can “git pull --all” update all my local branches?

I often have at least 3 remote branches: master, staging and production. I have 3 local branches that track those remotes.

Updating all my local branches is tedious:

git fetch --all
git rebase origin/master
git co staging
git rebase origin/staging
git co production
git rebase origin/production

I'd love to be able to just do a "git pull -all", but I haven't been able to get it to work. It seems to do a "fetch --all", then updates (fast forward or merges) the current working branch, but not the other local branches.

I'm still stuck manually switching to each local branch and updating.

Answers


git-up automates this. From the README:

So git pull merges by default, when it should really rebase. You can ask it to rebase automatically instead, but it still won't touch anything other than the currently checked-out branch. If you're tracking a bunch of remote branches, you'll get non-fast-forward complaints next time you push.

Solve it once and for all:


Need Your Help

YYYY/M/D format with date with bash

bash

i have to create a string in bash which can be such this way:

mySQL Query WHERE… OR… Shortcut

php mysql codeigniter activerecord

Is there a shortcut for writing the following mySQL query? I am looking for a shorthand to compress

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.