Git novice needs some assistance

I created a repo and have been committing changes for a little while. Recently I needed to fix some things in my code and it made things worse.

I renamed my current project file adding -OLD and created a new project folder.

I downloaded a zip of my GitHub files and extracted them into my local public_html project folder. I know, I shouldn’t have done that. I am just not used to git and go to old habits.

When I open this new project folder with Atom (I use Atom with git) I don’t have all the changes tracked by git (as I now expected). If I add the renamed project folder I get the tracked changes etc…

I want to revert back to the version I have on GitHub. I still have the old project folder with the .git folder inside.

What should I do at this point?

Maybe I found my solution?
If I do a git checkout – (file to be reset) for each file I need to revert that should do it?

If you want to get a modified file back to the last committed state, yes. :slightly_smiling_face:

See also: Git - Undoing Things

If you want to go back to a previous commit it depends a bit on what exactly you want, but git checkout and git reset will likely be involved in that case, too.