Question
How to remove all git repository history and set the current state as initial commit ?
This is the brute-force method. It also removes the configuration of the repository.
Step 1: remove all historyrm -rf .git
Step 2: reconstruct the Git repository with current contentgit init
git add .
git commit -m "Initial Commit"
Step 3: push to Git.git remote add origin <git-uri>
git push -u --force origin master
Add new comment