[IPython-dev] Heads-up: little utility in tools/, 'git mrb' for merging remote branches
Fernando Perez
fperez.net at gmail.com
Tue Dec 6 12:27:03 EST 2011
Hi all,
I committed this little utility I recently wrote and that others can
find useful:
https://github.com/ipython/ipython/blob/master/tools/git-mrb
I find myself very often testing remote branches from the same regular
contributors, so rather than copy/pasting github's instructions, I
made this that lets me simply highlight the branch name and type
git mrb remote:branchname # this last part copy/pasted from the PR page
For example, since I have Carreau's fork as a remote, I can do for
https://github.com/ipython/ipython/pull/1108:
git mrb Carreau:completer-usability-2
and it automatically fetches, merges (steps 1-2 of the merge
instructions) and then waits for me to test things out. It asks
whether I want to delete the branch and go back to master or to leave
it alone. I delete it if the tests don't pass, if there's a problem
or if I decide to do the merge with the github blue button (which
simplifies the editing of the merge commit message).
Possible enhancements:
- to support also working directly with a PR number
- auto-detecting that if I don't have a remote for the necessary
branch, it can go and fetch from github that one time, as right now
it's only useful for remotes you are already tracking (I've added the
remotes of frequent contributors for this reason).
But even as-is, I've found it to save me time as it makes the review
process quicker by pretty much automating the manual parts. Probably
more than the time itself of the actions, it's the more fluid process
it enables that I like, as I don't have to stop to do clunky manual
operations.
Cheers,
f
More information about the IPython-dev
mailing list