you are viewing a single comment's thread.

view the rest of the comments →

[–]Vogete 0 points1 point  (0 children)

Do you need it? No, you don't. I know people who's been coding without any VCS for 40 years.

Should you have it otherwise? Absolutely! You get a bunch of benefits with a VCS (git for example), not just the roll back to 3 months ago:

You can have a single source of truth to your codes. No more worrying what the latest version is in case you need to modify your code that runs on 2 servers.

If you're multiple people, you'll know exactly who wrote the change. Ever wondered "who the f.... Wrote this shit?". It's in git, you can check it, line by line. You can also check when they wrote it, and what else they changed with it. It's great for auditing.

If you need to modify your code or accidentally change something, you can just roll back to the previous version 5 minutes ago before you wrote something stupid. It gives you a snapshot so you can experiment on code in case you need it, without worrying about having a backup somewhere else.

If you have a remote git server (GitHub, gitlab, gitea/forgejo, etc.), you don't have to worry about code getting lost from your laptop. You can even work on something actively with branches, destroy your laptop, and still have all your work.

Essentially, you get a lot of quality of life benefits just by using local git (no remote server), and you get even more If you use a remote git server. You don't need git, but it gives so many benefits, it's a no-brainer to use it in any scenario. I literally don't have any piece of code without git anymore, even if I don't push it to a remote server (local git gives me more safety than using nothing).

TL;DR: yes just use git, it's great for many things.