I'd like to pull down an application, remove all git commit history and re-push it up so that the entire app is there and functional as it was before but with only one commit i.e. "Initial Commit".
I'm thinking of doing it this way:
git clone https://github.com/user/user-repo.git
cd user-repo
git reset --hard tags/v2.0
rm -rf .git/
git init
git add .
git commit -m 'first commit'
git remote add stash ssh://git@myserver:7999/myproject/user-repo.git
git push --force stash master
Albeit, I'm not sure if this is the best way to achieve the desired results.
Please help!
Thanks!