BroFox86
2/13/2018 - 12:20 PM

git: recreate repository based on current files

git: recreate repository based on current files

cp .git/config /tmp/gitBackup
rm -rf .git
git init
cp /tmp/gitBackup .git/config
git remote add origin <url from 1st command>
git add .
git status
git commit -m "rewrite history"
git push -f