Use Version Control

Version Control is one of the few things I have a very strong opinion about. And it's simple :

It's mandatory!

Not using one is asking for troubles and will slow you down, everyday.

What is version control ?

I like Atlassian's definition :

Version control, also known as source control, is the practice of tracking and managing changes to software code

Basically, it is a central system to which you can send your code. That system tracks changes, contributions and allows you to go back in time if you ever need to.

It acts as a backup system for source code and quickly becomes the central hub for all your sofware development activities.

Why is it important ?

It is important as it can keep track of changes made and how you got to where you are at now. It is not uncommon to be willing to try something only to abandon it for some reason. Too complicated, not working, ... whatever it is.

If you don't use Version Control, you'll need to juggle backups and handle versions manually. Not to mention the need to keep things synchronized between multiple contributors, or simplifying, automating, improving processes, ...

To simplify, if you're building software:

A Version Control system is mandatory.

You can use github, gitlab, ... for free, so no excuse not to.

Don't overthink it !

You may be reading a lot of things about best practices, git flows, workflows, ... If you are just getting started. Stop!

Don't overthink to much your version control strategy.

Use git.

You could consider svn, mercurial, or any other solution. But, nowadays, the reference is git. It is close to a monopoly in the world of Source Control Management tools. Just use that.

Then, consider your needs.

Unless you're having a big teams or processes already setup. Start simple. Just use it for "backups" and tracking changes.

When you need more, for any reason, then you can consider adding more processes and controls around it.

It is easy enough to adjust and add more later.

Don't do that !

There are few things you mustn't do. The major ones are related to security aspects.

Consider your version control tool as public. Assume anyone can see what's there. Don't put anything that you don't want others to know. No password, no key, no sensitive information at all!

Version control system keep the full history of what you send to them. It means, that if you put a password in, and then remove it, it can still be available by looking at the past versions.

If you do, remove it and then change the related data so that whatever is in history isn't what is active now.

Besides that, nothing is irreversible and can't be undone or improved. Feel free to experiment and try automations that can streamline your work.

A smaller advice, which can impact productivity.

One last advice, at some point, you may have multiple developers. You may want to control/check what get submitted.

Be careful as to where and how you set those. Protect what is be common and leave as much freedom as possible to people contributing. Everyone works differently and trying to enforce a style may not be in your best interest.

However, making sure that the output is consistent is a great idea. So, don't enforce anything on what's "personal", user branches, preferences, ...

Put the checkpoints when things get merged into the common pool. Only allow in what satisifies your requirements.