Skip to content

Instantly share code, notes, and snippets.

@thebnich
Created March 1, 2017 22:54
Show Gist options
  • Save thebnich/4f054fe719774b5a58c36a3217065de0 to your computer and use it in GitHub Desktop.
Save thebnich/4f054fe719774b5a58c36a3217065de0 to your computer and use it in GitHub Desktop.
#!/usr/bin/env sh
set -e
if [ "$#" -ne 1 ]
then
echo "Wrong number of arguments. Should be 1, was $#";
exit 1;
fi
git push -f thebnich $1:$1
git push mozilla master
git push thebnich :$1
git branch -d $1
#!/usr/bin/env sh
set -e
if [ "$#" -lt 2 ]
then
echo "Wrong number of arguments. Should be 2-3, was $#";
exit 1;
fi
git checkout $1
git rebase master
git checkout master
git merge --no-ff $1 -m "Merge pull request #$2
$3"
@mcomella
Copy link

mcomella commented Mar 3, 2017

Also, you could do this as a git alias if you'd like. For example, my "reset/checkout" alias, for merging pbxproj:

 rco = "!f() { git reset $1 && git checkout $1; }; f"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment