Upgrade & Secure Your Future with DevOps, SRE, DevSecOps, MLOps!

We spend hours scrolling social media and waste money on things we forget, but won’t spend 30 minutes a day earning certifications that can change our lives.
Master in DevOps, SRE, DevSecOps & MLOps by DevOps School!

Learn from Guru Rajesh Kumar and double your salary in just one year.


Get Started Now!

reset your commit in GitHub

Github

Here are some ways to reset your commit in GitHub:

  • If you haven’t pushed the commit yet:

Run the following command in your terminal:

git reset --soft HEAD~

This will undo the last commit and keep the changes in your working directory.You can then make a new commit with the correct changes.

  • If you’ve already pushed the commit:

You can use the git revert command to create a new commit that reverses the changes made in the original commit.
To do this, run the following command in your terminal:

git revert <e3222d33263dd7d35eafc920b710f9a931ec022a>
0 0 votes
Article Rating
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x