Skip to content

Instantly share code, notes, and snippets.

@eyalgo
Last active June 4, 2018 10:03
Show Gist options
  • Save eyalgo/3731c5f7ffa9c88f1da82ba3c82e0438 to your computer and use it in GitHub Desktop.
Save eyalgo/3731c5f7ffa9c88f1da82ba3c82e0438 to your computer and use it in GitHub Desktop.
#!/bin/sh
if [ -z "$1" ]
then
echo "Branch name is missing"
else
# Go to relevant branch
git checkout $1
# fetch everything
git fetch
#rebase interactive
git rebase -i origin/master
fi
# See https://git-scm.com/docs/git-rebase
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment