'Git - Duplicate repo with history except the initial commit

I have a private repository that include more than 60 commits. I want to make it public, but for this I need to delete a private information (and also delete from history) in the README.md that is added in the initial commit. How can I do this?

I tried the answers in this post but did not work :( Thanks all who will answer in advance!



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source