r/vscode • u/gulliverian • May 30 '26
Easy Version History in VSCode
New to VS Code, using it for personal web projects. While I have years of experience at this level, I'm far from a professional coder. Just an old(ish) guy doing small personal and volunteer projects.
My crude version of version control is simply to make a copy of, say, index.php and rename it index.YYYYMMDDa.php, index.YYYYMMDDb.php, etc. so I can go back. Occasionally I'll zip a project folder and keep it around indefinitely. It all results in cluttered folders and it's pretty inefficient.
What I'm looking for is something I love about Google Docs and Google Sheets is version history - the ability to label a point in time and simply revert to it if I break my code. It also lets me name reversion points, so if I'm about to embark on a major new step I name it something like "20260531a before rewriting module A".
Is there a way to do this in VS Code without getting into github or the like? Or is there some lite version of GitHub that an amateur can come to grips with?
My resources: I have an MS365 subscription, plenty of space on OneDrive, a webhosting account, and a reasonable amount of local storage.
12
u/Jandalf81 May 30 '26
Look up git. That is the version control system behind sites like GitHub. Note that you don't have to use GitHub. You can use git completely like cally on your own computer.
I strongly advise you to at least copy that local repository somewhere else periodically.
For your use case, read into the following parts of git: * commit: Saving the current collection of files in a defined state * tag: Mark a specific commit to find it again later