Answers for "git remove all previous commits from repository"

10

git remove all local commits

git reset --hard origin/<branch_name>
Posted by: Guest on April-18-2021
2

git revert all commits to pervious commit

git revert --no-commit <commithash>..HEAD #revert changes in range of commits from head to back to that commit hash
Posted by: Guest on September-22-2020

Code answers related to "git remove all previous commits from repository"

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language