Do you know the benefits of using source control?

Last updated by Jack Pettit [SSW] over 1 year ago.See history

Source control is the backup of your code, as well as your tool for tracking changes over time.

With source control, we can share project code and collaborate with other team members. Using it allows us to track changes, compare code, and even roll-back if required. Moreover, it keeps our code safe and that is the most important part.

It also helps you to do root cause analysis by finding out who made the change. Then, you can chat with them and get aligned on what caused the problem and what is the best solution moving forward. Remember, the person who made the change might have important knowledge that you don't know!

Don't just fix the problem, see who caused the problem and correct them. - Adam Cogan

Using VS Code? There are 2 awesome extensions to see history:

Figure: Right-click a file and select Git | View History to see the changes in source control.

Figure: We can select different changesets and compare the changes

Figure: We can select different changesets and compare the changes. Blue = modified, Green = addition, Red = deletion

Figure: Right click a file and select Git | Blame (Annotate) to view the history on a segment basis

Figure: Use annotate to understand (or find the guy) to understand his thoughts before deleting/changing someone elses code

Figure: Annotation is great, but it gets even better when clicking the commit code gives you its full details

We open source. Powered by GitHub