Skip to content

Instantly share code, notes, and snippets.

@hannesoid
Created January 8, 2019 10:44
Show Gist options
  • Save hannesoid/cbc7cc3b09a6392f740d96320436a51e to your computer and use it in GitHub Desktop.
Save hannesoid/cbc7cc3b09a6392f740d96320436a51e to your computer and use it in GitHub Desktop.
Update current & base branch, then merge into current branch
# Copy this into you .bashrc or similar
# Pull current & base branch, then merge-in base
gitupdatefrom() {
echo "➖ Pull current branch…"
git pull
echo "➖ Pull $1…"
git fetch origin "$1":"$1"
echo "➖ Merge $1 into current branch…"
git merge "$1"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment