Last Updated: February 25, 2016
·
900
· chantastic

all your git rebase...

My bash profile is chock-full of nerd-influenced frivolity. Let's talk about allyourbase.

Picture

allyourbase is one of my many aliases for git. It's a one-liner that rebases my working branch onto origin/master. I do this a lot. So keeping it concise is a win.

Now, I'm assuming that you aren't a terrible human and you rebase your branches before merging. But if you enjoy wasting the time of friends and co-workers, please ignore this great rebasing how-to.


If you're like me, you probably rebase with two commands:

$ git fetch
$ git rebase origin/master

Pretty standard.

Most of the time, I only care about the changes to master. And for that, two commands is pretty insufferable.

Combining these commands into an alias saves my fingers and has that fresh 'hostile takeover' feeling:

alias allyourbase='git fetch; git rebase origin/master'

It's trivial but I delight in using it—which makes my PRs better.

Don't be a jerk; use allyourbase to take control of your bases branches.

2 Responses
Add your response

git pull --rebase

over 1 year ago ·

@zhuangya

Yup! Love pull --rebase!

Sadly, it doesn't buy me a lot when I'm rebasing onto orign/master:

git pull --rebase origin master
over 1 year ago ·