Answers for "how to delete a commit in git remotely"

1

how to delete a commit in git remotely

If you want to delete for example the last 3 commits, run the following command to remove the changes from the file system (working tree) and commit history (index) on your local branch:

git reset --hard HEAD~3
Then run the following command (on your local machine) to force the remote branch to rewrite its history:

git push --force
Posted by: Guest on May-31-2021

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language