Skip to content

Instantly share code, notes, and snippets.

@suzumura-ss
Last active February 13, 2020 09:16
Show Gist options
  • Save suzumura-ss/1268ea72a3b95c940b5e52151dac7e8e to your computer and use it in GitHub Desktop.
Save suzumura-ss/1268ea72a3b95c940b5e52151dac7e8e to your computer and use it in GitHub Desktop.
git fetch stage and master branch.
#!/bin/bash
git-fetch () {
git checkout $1
git pull --rebase
}
current=$(git rev-parse --abbrev-ref HEAD)
git fetch --prune
git-fetch stage
git-fetch master
git checkout $current
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment