Git CLI Delete History Commit Checkoutgit checkout --orphan latest_branchAdd all the files git add -ACommit the changes git commit -am commit messageDelete the
- Checkout
- Add all the files
- Commit the changes
- Delete the branch
- Rename the current branch to master
- Finally, force update your repository
git checkout --orphan latest_branch
git add -A
git commit -am "commit message"
git branch -D master
git branch -m master
git push -f origin master