Skip to content

Instantly share code, notes, and snippets.

@debnath
Created November 10, 2017 03:36
Show Gist options
  • Save debnath/a633ec01d4a6086180ac9ae215f11ef4 to your computer and use it in GitHub Desktop.
Save debnath/a633ec01d4a6086180ac9ae215f11ef4 to your computer and use it in GitHub Desktop.
function gitu {
BRANCH=${1:-master}
echo "Checking out $BRANCH"
git checkout "$BRANCH" && git fetch origin && git merge --ff-only origin/"$BRANCH"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment