Source Code Management

Source Code Management (源代码管理)

Definition

Definition (定义)

Source code management (SCM) is synonymous with Version control. It is a software tool that programmers use to manage source code. It tracks modifications to a source code repository and helps deal with merge conflicts. (源代码管理(SCM)是版本控制的同义词。它是程序员用来管理源代码的软件工具。它跟踪对源代码存储库的修改,并帮助处理合并冲突。)

Advantages of Source Code Management

Advantages of Source Code Management (源代码管理的优势)

SCM has a lot of useful features that can make your work even more effective and more manageable. (SCM具有许多有用的功能,可以使您的工作更有效,更易于管理。)

SCM is used for tracking the changes over time, thus creating a historical record, which can be used to find out where the bugs come from, compare the older versions and even undo some changes to the code base. Besides, it also archives these changes giving a cleaner look to the history log. (SCM用于随着时间的推移跟踪更改,从而创建历史记录,可用于查找错误的来源,比较旧版本,甚至撤消对代码库的一些更改。此外,它还归档了这些更改,使历史记录看起来更干净。)

With the help of SCM, each developer works independently on a separate branch and once the work is done, all the branches are merged together. (在SCM的帮助下,每个开发人员在一个单独的分支上独立工作,一旦工作完成,所有分支将合并在一起。)

Importance of Source Code Management

Importance of Source Code Management (源代码管理的重要性)

  • Track Changes – Changes can be tracked as someone making a change leaves a commit message about it. (-跟踪更改–当有人进行更改时,可以跟踪有关更改的提交消息。)

  • Synchronization – The up-to-date codes can be fetched from the repository. (-同步–可以从存储库获取最新代码。)

  • Backup and Restore – Files are saved at any time and restored from the last saved one. (-备份和还原–文件随时保存,并从上次保存的文件中还原。)

  • Undoing – You can undo both the last known version and the last one created a long time ago. (-撤消–您可以同时撤消上一个已知版本和很久以前创建的最后一个版本。)

  • Branching and Merging – Changes are made on a branch and after being approved, they can be merged with the master branch. (-分支和合并–更改是在分支上进行的,经批准后,可以与主分支合并。)

  • Identifying Conflicts and Preventing Overwrites – Overwrites are prevented and in case of conflicts, they are identified. SCM notifies the developers so that they can review these conflicts and resolve them. (-识别冲突并防止覆盖–可以防止覆盖,并在发生冲突时进行识别。SCM通知开发人员,以便他们可以查看这些冲突并解决它们。)

Best Practices

Best Practices (最佳实践)

  • Frequent commits - Commits are snapshots that capture the current state of a project. Frequent commits give many opportunities to go back and undo the work. The commits can be combined into just a single commit to make clear the log. (-频繁提交-提交是捕获项目当前状态的快照。频繁的承诺提供了许多回退和撤消工作的机会。可以将提交合并到单个提交中,以清除日志。)

  • Work from latest version - SCM enables having a local copy of the codebase. To avoid merging conflicts pull or fetch the latest code before updating. (-从最新版本开始工作- SCM允许拥有代码库的本地副本。为避免合并冲突,请在更新前拉取或提取最新代码。)

  • Detailed Notes - It is a nice practice to leave a descriptive commit log message which will convey the commit’s content. Log messages become a “must” in the course of the project’s development. (-详细说明-留下描述性的提交日志消息来传达提交内容是一个很好的做法。日志消息成为项目开发过程中的“必须”。)

  • Review - SCM provides a staging area which is used to collect edits before committing and review changes before creating a snapshot. (-审核- SCM提供了一个临时区域,用于在提交之前收集编辑并在创建快照之前审核更改。)

  • Branches - This super powerful mechanism allows team members to work on a separate line of development. When branch development is complete it can be merged into the master line. (-分支机构-这种超级强大的机制允许团队成员在单独的开发线上工作。当分支开发完成时,它可以合并到主行中。)

  • Workflow - SCMs offer form methods of contribution. It is very important that the team establishes shared patterns of collaboration. SCM workflows set up processes for merging branches. (-工作流程- SCMS提供形式贡献方法。团队建立共享的协作模式非常重要。SCM工作流程设置合并分支的流程。)



请遵守《互联网环境法规》文明发言,欢迎讨论问题
扫码反馈

扫一扫,反馈当前页面

咨询反馈
扫码关注
返回顶部