0 votes
in DevOps by
Git is a popular DevOps tool. Tell us how you will revert a commit that has already been pushed and made public.

1 Answer

0 votes
by
There are two ways of doing so:

By creating a new commit to undo all changes made by the commit that has already been pushed and made public. Following command is used for doing so:

git revert

By fixing or removing the bad file in a new commit and then pushing it to the remote repository. After making necessary changes to the file, commit it to the remote repository using the command:

git commit -m “commit message”

Related questions

0 votes
asked Oct 30, 2022 in DevOps by Robindeniel
0 votes
asked Apr 18, 2020 in Git Slack Integration by SakshiSharma
...