Skip to content

Instantly share code, notes, and snippets.

@claytantor
Created February 17, 2016 18:44
Show Gist options
  • Save claytantor/581287ee8c6393e82016 to your computer and use it in GitHub Desktop.
Save claytantor/581287ee8c6393e82016 to your computer and use it in GitHub Desktop.
#!/bin/bash
git checkout --orphan temp $1
git commit -m "First commit"
git rebase --onto temp $1 master
git branch -D temp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment