• Home /
  • Blog /
  • How to revert file to previous commit version in Git
git-tutorials.png

How to revert file to previous commit version in Git

When you modified, but did not commit file and want to revert your changes, you can use git checkout command providing file name or wildcards to revert, for example, all files of the same type.

How to revert single file in git

git checkout path-to-file

How to revert group of files in git

# git checkout wildcards
git checkout *.cs


Comments

Search

Yaplex logo white text

Yaplex is an IT Consulting and .NET development company co-founded by .NET Developer Alex Shapovalov who lives in Mississauga and provides software development services in Toronto, Mississauga, and GTA.

Contact Information

Toronto, Canada
Phone: +1 647 328 3809