Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/sh
- if [ $# -lt 1 ]; then
- echo 'usage: git oh-i-mistakenly-commited-to-master <branchname>'
- exit
- fi
- git checkout master
- git checkout -b "$1"
- git checkout master
- git reset --hard $(git config branch.master.remote)/master
- git checkout "$1"
Add Comment
Please, Sign In to add comment