DEV Community

Cover image for Understanding Git in a Simple Way - Part 5
Ganesh Kumar
Ganesh Kumar

Posted on

Understanding Git in a Simple Way - Part 5

Hello, I'm Ganesh. I'm working on FreeDevTools online, currently building a single platform for all development tools, cheat codes, and TL; DRs — a free, open-source hub where developers can quickly find and use tools without the hassle of searching the internet.

In this blog, we will learn about git revert.

git revert

This is used for removing any old commits.

For example:

I want to remove c1 from the main branch.

By reverting old changes and remaining will be the same view.

Conclusion

Here, a simple overview.

command What moves? Danger level Use When
checkout Head only Safe Exploring history
reset Branch Medium reshaping local work
revert Nothing Safe Undoing Shared History

In the next blog, we will learn about git rebase.

Top comments (0)