How to revert back to a Git commit

git

I just started using Git on Windows and I have a small question. When I say git commit along with a message I realize that git commits the file. But where exactly does it store the commited file?

Let's say I make some changes and want to revert back to my third commit using Git GUI. How exactly do I do that?

Best Answer

Git commit only saves it to the stage, which is locally on your computer. Use Push to update it to a remote server (Like github).

Use git revert <ID> to revert back to a previous commit. each commit has an identifying code.

See here for more details on revert

Related Question