How to remove all commit history in git?

Clone the project, e.g. myproject is my project repository:
git clone https://github.com/huniko519/myproject.git
Since all of the commits histories are in the .git folder, we have to remove it:
cd myproject
And delete the .git folder:
git rm -rf .git
Now, re-initialize the repository:
git init
git remote add originhttps://github.com/huniko519/myproject.git
git remote -v
Add all the files and commit the changes:
git add --all
git commit -am "Initial commit"
Force push update to the master branch of our project repository:
git push -f origin master
Done...




