- Deleting the folder first can cause problems in the git repository;
.git
- If you want to delete all commit history, but keep the code in its current state, you can do it safely as follows:
- try to run ;
git checkout --orphan latest_branch
- add all files ;
git add -A
- commit changes ;
git commit -am "commit message"
- delete branch ;
git branch -D master
- rename the current branch ;
git branch -m master
- Finally, force an update of the repository: .
git push -f origin master
- complete!
{{o.name}}
{{m.name}}