Last active
July 6, 2018 16:07
-
-
Save pjbelo/e687692736eb50a5e77ea861ee697baf to your computer and use it in GitHub Desktop.
git delete history
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## Step 1: remove all history | |
cd <project-folder> | |
rm -rf .git | |
## Step 2: initialize the Git repo | |
git init | |
git add . | |
git commit -m "Initial commit" | |
## Step 3: push to remote | |
git remote add origin <remote-uri> | |
git push -u --force origin master |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment