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:

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

CompareFileChanges
Figure: We can select different changesets and compare the changes

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

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

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

AnnotateDetails
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