Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

how to remove all commits in git

git checkout --orphan latest_branch
git add -A
git commit -am "commit message"
git branch -D main
git branch -m main
git push -f origin main
 
PREVIOUS NEXT
Tagged: #remove #commits #git
ADD COMMENT
Topic
Name
4+3 =