Visual Studio 2010 Best Practices
上QQ阅读APP看书,第一时间看更新

Principles

To get an idea of what can be done, and thus what should be done with SCC, it's a good idea to briefly describe the principles of source code control:

  • Tracking: First and foremost, source code control deals with tracking changes. SCC systems generally track the deltas (just the changes) made from one commit to the next.
  • History: SCC keeps a history of what was done to each file for each commit. This includes date/time, user, changes, comments, and so on. This history allows users to see what has been done to the code in the past and thus supports the next principle.
  • Collaboration: SCC systems aid in collaboration by providing means to isolate the changes of one team member from another. These systems also provide very powerful tools to merge isolated changes together.
  • Auditing: SCC allows auditing of changes. Many systems have an annotate or blame feature that allows you to track the modification of a particular line in a particular file to a specific person. I don't generally think "blaming" someone for something is particularly productive, but it can come in handy.
  • Backup: Of course, anything that maintains a history of changes that have been made over time is a form of backup. If you run into a problem with the source code at some point, you can return to the previous version(s) of the source code (backups). This allows you to find where a problem was first introduced or to simply start over from some past state.