in DevOps by
What is the process for reverting a commit that has already been pushed and made public?

1 Answer

0 votes

There are two ways that you can revert a commit: 

Remove or fix the bad file in a new commit and push it to the remote repository. Then commit it to the remote repository using:

git commit –m "commit message"

Create a new commit that undoes all the changes that were made in the bad commit. Use the following command:

git revert <commit id>

Example: git revert 56de0938f

Related questions

0 votes
asked Oct 16, 2019 in Git by rajeshsharma
0 votes
asked Dec 18, 2020 in SVN by SakshiSharma
0 votes
asked Oct 30, 2022 in DevOps by Robindeniel
+1 vote
0 votes
asked Mar 22, 2021 in JavaScript by Robindeniel