We want to be sure that as a programmer, we create processes that are easily understood. That means easily understood naming conventions, singularly focused functions, and consistent formatting. As soon as you see a problem in your code, fix it. The longer problematic logic stays the harder it is to change it. The best way to start with source control is utilise resources like Design by Contract, Git, or Visual Studio Code. Take a look at books “Pragmatic Programmer” and “Clean Code” for some further discussion on efficient and clean codes.