Clear out the history of a git repository
Git
sh
# Remove the .git directory
rm -rf .git
# Recreate a new repo with the current content
git init
git add .
git commit -m "Initial commit message"
# Push to remote
git remote add origin git@github.com:<YOUR_ACCOUNT>/<YOUR_REPO>.git
git push -u --force origin master
to pull from an already cloned repo:
sh
git pull origin master --allow-unrelated-histories