Skip to content

Instantly share code, notes, and snippets.

@jcalabres
Last active January 12, 2020 14:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jcalabres/955ab3ce531ea8de31cd4049e3d03044 to your computer and use it in GitHub Desktop.
Save jcalabres/955ab3ce531ea8de31cd4049e3d03044 to your computer and use it in GitHub Desktop.
Delete all commits from Git
git checkout --orphan latest_branch && \
git add -A && \
git commit -am "initial commit" && \
git branch -D master && \
git branch -m master && \
git push -f origin master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment