I want to delete all commit history but keep the code in its current state because, in my commit history, there are too many unused commits.
How can I do it?
Is there any git command can do this?
git filter-branch ?
git rebase ?
...
My code is hosted on github.com.
rm -rf .*git
command which will delete any file ending with .git. 2) Back out to parent directory and rungit init
which will initialize .git file by creating a new blank .git file without history 3) rungit add .
orgit add *
4) rungit commit --all -m "initial commit" 5) run
git --set-upstream origin <git-url>` 6) run ` $ git push --mirror <git-repository-path` This process is going to re write history. – Edington