Skip to content

Instantly share code, notes, and snippets.

@ZaneMeroff
Created September 11, 2021 15:16
Show Gist options
  • Save ZaneMeroff/5224f0327d13ba394c9d654ec2cd005a to your computer and use it in GitHub Desktop.
Save ZaneMeroff/5224f0327d13ba394c9d654ec2cd005a to your computer and use it in GitHub Desktop.
Remove remote and squash git history

Remove local remote

git remote remove origin

Squash all git history into one commit

git checkout --orphan some-branch
git commit -m "First commit"
git branch -f master
git checkout master
git branch -d some-branch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment