Skip to content

Instantly share code, notes, and snippets.

@nhducit
Last active May 29, 2018 04:03
Show Gist options
  • Save nhducit/d1daff3fd2737358cf7ca7c561eed541 to your computer and use it in GitHub Desktop.
Save nhducit/d1daff3fd2737358cf7ca7c561eed541 to your computer and use it in GitHub Desktop.
rebase latest master for lazy people
#!/usr/bin/env bash
cd <projectDir>
currentBranch=$(git rev-parse --abbrev-ref HEAD)
git checkout master
git pull
git checkout $currentBranch
git rebase master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment