Skip to content

Instantly share code, notes, and snippets.

@MPJHorner
Created April 22, 2016 16:01
Show Gist options
  • Save MPJHorner/4f79a730f4ed3b8a4ee8daa6a9d730e1 to your computer and use it in GitHub Desktop.
Save MPJHorner/4f79a730f4ed3b8a4ee8daa6a9d730e1 to your computer and use it in GitHub Desktop.
Checkout
`git checkout --orphan latest_branch`
Add all the files
`git add -A`
Commit the changes
`git commit -am "commit message"`
Delete the branch
`git branch -D master`
Rename the current branch to master
`git branch -m master`
Finally, force update your repository
`git push -f origin master`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment