in Technology by

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

1 Answer

0 votes
by

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
    In Git how do you revert a commit that has already been pushed and made public?...
asked Nov 2, 2020 in Technology by JackTerrance
0 votes
    Is there a way to revert a git commit that’s already been pushed and made public?...
asked Nov 4, 2020 in Technology by JackTerrance
0 votes
    The _______________ policy, allows a transaction to commit even if it has modified some blocks that have ... Buffer Management in chapter Recovery System of Database Management...
asked Oct 10, 2021 in Education by JackTerrance
0 votes
    How to Undo a Git merge that hasn't been pushed yet?...
asked Jan 7, 2021 in Technology by JackTerrance
0 votes
    I have a simple command line tool that fetches preview images from a remote location and uploads to ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 23, 2022 in Education by JackTerrance
0 votes
    Recently, it has been made compulsory in India and some other countries to mix 10% ethanol with ... ,Science proposed by,electromagnetic theory engineering physics,Science nptel...
asked Nov 7, 2021 in Education by JackTerrance
0 votes
    Consider a list2 with values 70,60,50. What will be the output statements considering that the above object has ... print(list2*3) Select the correct answer from above options...
asked Dec 29, 2021 in Education by JackTerrance
0 votes
    I have made a commit and discarded it. I can still retrieve that commit using git reflog. A. True B. False...
asked Dec 24, 2022 in Education by JackTerrance
0 votes
    How do you find a list of files that have been changed in a particular commit?...
asked Oct 4, 2020 in Technology by Editorial Staff
0 votes
    Developer A has done some changes in the subproject and pushed it. Developer B can pull those changes using __________. ... submodule update C. git pull origin D. git submodule add...
asked Dec 20, 2022 in Technology by JackTerrance
0 votes
    How will you find out what all files have been changed in a particular Git commit?...
asked Nov 4, 2020 in Technology by JackTerrance
0 votes
    Can we make changes on the repo and how we can make sure that the same has been merged into the working copy?...
asked Feb 18, 2021 in Technology by JackTerrance
0 votes
    Which algorithm chooses the page that has not been used for the longest period of time whenever the page ... recently used algorithm d) counting based page replacement algorithm...
asked Oct 27, 2022 in Education by JackTerrance
0 votes
    git bisect is used to identify a commit that has introduced a bug. A. True B. False...
asked Dec 24, 2022 in Technology by JackTerrance
0 votes
    It has been found that if A and B play a game 12 times, A wins 6 times, B wins 4 times and they draw twice. ... 19 27 D. none of these Select the correct answer from above options...
asked Nov 16, 2021 in Education by JackTerrance
...