{"id":37,"date":"2014-05-16T16:21:59","date_gmt":"2014-05-16T16:21:59","guid":{"rendered":"https:\/\/devopsbuzz.com?p=37"},"modified":"2022-01-22T16:48:26","modified_gmt":"2022-01-22T16:48:26","slug":"version-control-systems","status":"publish","type":"post","link":"https:\/\/devopsbuzz.com\/version-control-systems\/","title":{"rendered":"Version Control Systems &#8211; All You Need To Know"},"content":{"rendered":"\n<p>We read the basics and importance of the SCM process in our last article &#8211; you can check that out here: <a href=\"https:\/\/devopsbuzz.com\/software-configuration-management-scm\/\">Software Configuration Management Guide<\/a>.<\/p>\n\n\n\n<p>In this post, we will start with the <strong>most important aspect of SCM<em> &#8211; <\/em>VCS i.e. Version Control Systems<\/strong>.<\/p>\n\n\n\n<p>Let&#8217;s get started.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"What-is-Version-Control-System\"><\/span>What is Version Control System?<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p><strong>VCS is the root of the tree named SCM<\/strong> &#8211; without Version controlling, the Software configuration management process cannot be assumed.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img loading=\"lazy\" decoding=\"async\" width=\"490\" height=\"354\" src=\"https:\/\/devopsbuzz.com\/wp-content\/uploads\/2014\/05\/Version-Control-Systems-e1400255456474.png\" alt=\"Version Control Systems - Software Configuration Management\" class=\"wp-image-57\" title=\"Version Control Systems\"\/><\/figure><\/div>\n\n\n\n<p class=\"has-text-align-center\"><\/p>\n\n\n\n<p><strong>Version control<\/strong> is also known as Revision control a.k.a. source control, is a process to manage a collection of program code and changes that provide you with many capabilities, such as:<\/p>\n\n\n\n<ul><li>Maintain multiple versions of code<\/li><li>An ability to go back to any previous version.<\/li><li>Developers can work in parallel.<\/li><li>Audit traceability with clear picture on whom, which when, where and what are the changes.<\/li><li>Synchronize the code.<\/li><li>Copy\/Merge\/Undo the changes.<\/li><li>Find out the difference between versions.<\/li><li>Provides full backup without occupying much space.<\/li><li>Review the history of the change.<\/li><li>Capable for both small and large scale projects.<\/li><li>Ability to share and work on the code across the globe.<\/li><\/ul>\n\n\n\n<p>In simpler words, <strong>Version Control System<\/strong> allows you to manage and keep track of all your source code, along with the evidence that all your changes are being stored in a repository.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Importance-of-Version-Control-Systems\"><\/span>Importance of Version Control Systems<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Let\u2019s take an example of an organisation with a project team of five developers.<\/p>\n\n\n\n<p>Two of them are sat in one location and the other three are in a different location. They got a project and started developing the code, they come across the following situations when they were working on the project:<\/p>\n\n\n\n<p>Each developer is working on one module at a time whereas others were waiting for him to complete his tasks so that they can start working on that [<em>Time Consuming Process and inability to work in parallel<\/em>].<\/p>\n\n\n\n<p>Whenever they complete their work and decide to deploy the code, they were taking a full backup of the project and one day they couldn\u2019t do it because the disk was full [<em>Disc Space issue<\/em>].<\/p>\n\n\n\n<p>One day one of them deleted one module which they couldn&#8217;t bring back and had to rework on the same module [<em>Inability to revert the changes and get the old code back<\/em>]\n\n\n\n<p>They were unable to find out who has done what changes and when the changes were made [<em>Inability to view the history and lack of traceability<\/em>]\n\n\n\n<p>They couldn\u2019t do any experiment for the new feature without interfering with other\u2019s work [<em>Inadequate programming practice<\/em>]\n\n\n\n<p>They need to send the code via email as they were seated at different locations [<em>Incapability of working across the globe and hence jeopardizing collaboation<\/em>]\n\n\n\n<p>Here comes the <strong>need for a Version Control System<\/strong> which can help you to achieve all the above incapabilities along with many more other features.<\/p>\n\n\n\n<p>A version control system always ensures that all the previous versions of all your code can be retrieved later on and all changes to the code can be traced over time.<\/p>\n\n\n\n<p>It will help you to find out what changes were made to which file, when, why and by whom.<\/p>\n\n\n\n<p>It also explains that what a file looked like on a specific date or at a specific release along with the ability to find the differences between any two versions of a file.<\/p>\n\n\n\n<p>A version control system provides the ability to work in parallel without snooping the other\u2019s work and that too across the globe. <em>[Click to enlarge image]<\/em><\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><a href=\"https:\/\/devopsbuzz.com\/wp-content\/uploads\/2014\/05\/conventional_vs_version_control_system.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1506\" height=\"660\" src=\"https:\/\/devopsbuzz.com\/wp-content\/uploads\/2014\/05\/conventional_vs_version_control_system.png\" alt=\"Conventional Method vs Version Control System\" class=\"wp-image-38\" srcset=\"https:\/\/devopsbuzz.com\/wp-content\/uploads\/2014\/05\/conventional_vs_version_control_system.png 1506w, https:\/\/devopsbuzz.com\/wp-content\/uploads\/2014\/05\/conventional_vs_version_control_system-300x131.png 300w, https:\/\/devopsbuzz.com\/wp-content\/uploads\/2014\/05\/conventional_vs_version_control_system-1024x448.png 1024w\" sizes=\"(max-width: 1506px) 100vw, 1506px\" \/><\/a><\/figure><\/div>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Types-of-Version-Control-Systems\"><\/span>Types of Version Control Systems<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>There are 2 types of Version Control Systems &#8211; namely Centralized and Distributed.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Centralized Version Control<\/h3>\n\n\n\n<p>The concept of a centralized system is that it works on a Client-Server relationship. The repository is located in one place and provides access to many clients.<\/p>\n\n\n\n<p>A snapshot of <strong>how a Centralized Version Control System works<\/strong>.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img loading=\"lazy\" decoding=\"async\" width=\"820\" height=\"877\" src=\"https:\/\/devopsbuzz.com\/wp-content\/uploads\/2014\/05\/central_vcs.jpg\" alt=\"Central Version Control Systems\" class=\"wp-image-52\" title=\"Central Version Control Systems\" srcset=\"https:\/\/devopsbuzz.com\/wp-content\/uploads\/2014\/05\/central_vcs.jpg 820w, https:\/\/devopsbuzz.com\/wp-content\/uploads\/2014\/05\/central_vcs-280x300.jpg 280w\" sizes=\"(max-width: 820px) 100vw, 820px\" \/><\/figure><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">Distributed Version Control<\/h3>\n\n\n\n<p>On the contrary, in <strong>Distributed System<\/strong>, every user has a local copy of the repository in addition to the central repo on the server-side.<\/p>\n\n\n\n<p>Below is <strong>how a Distributed Version Control System works<\/strong>.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img loading=\"lazy\" decoding=\"async\" width=\"820\" height=\"877\" src=\"https:\/\/devopsbuzz.com\/wp-content\/uploads\/2014\/05\/distributed_vcs.jpg\" alt=\"Distributed Version Control Systems\" class=\"wp-image-53\" title=\"Distributed Version Control Systems\" srcset=\"https:\/\/devopsbuzz.com\/wp-content\/uploads\/2014\/05\/distributed_vcs.jpg 820w, https:\/\/devopsbuzz.com\/wp-content\/uploads\/2014\/05\/distributed_vcs-280x300.jpg 280w\" sizes=\"(max-width: 820px) 100vw, 820px\" \/><\/figure><\/div>\n\n\n\n<p>You can direct your browser to this link to check out the <strong><a href=\"https:\/\/devopsbuzz.com\/centralized-vs-distributed-version-control-systems\/\" target=\"_blank\" rel=\"noopener noreferrer\">difference between Centralized Version Control and Distributed Version Control<\/a>.<\/strong><\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Version-Control-Systems-Best-Practices\"><\/span>Version Control Systems: Best Practices<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<ul><li>Make sure that you put all your code, documents, configuration files, etc under version control system.<\/li><li>Update your working copy frequently to incorporate others&#8217; changes in your local working copy and to get the latest.<\/li><li>Test the code comprehensively in your local before committing to make sure it\u2019s really completed and has no side effects.<\/li><li>Commit often, self-contained changes regularly but don\u2019t commit half work done which may break any functionality.<\/li><li>Write a descriptive commit message so that any other member can easily understand what made you to commit this change and how its different from previous commit.<\/li><li>Always remember that the tools are line-based and make sure you don\u2019t change the file format while updating your code.<\/li><li>Use a common project structure and naming convention to avoid any confusion for others<\/li><li>Setting up change notifications to send out an e-mail whenever any commit is made.<\/li><li>Always do regular backups of your repository or schedule a nightly backup for all the repositories.<\/li><\/ul>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Benefits-of-Version-Control-Systems\"><\/span>Benefits of Version Control Systems<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Version Control System <strong>works as a database of all your code<\/strong> and makes revisions instead of duplicating the files which helps you to save a lot of disk space<\/p>\n\n\n\n<p>It <strong>keeps all the history of all the files<\/strong> which gives you full traceability and audibility of the change on what changes were made to which file, when, why and by whom.<\/p>\n\n\n\n<p>It provides an <strong>ability to revert back to the last revision<\/strong> or any previous stage as per requirement.<\/p>\n\n\n\n<p>It <strong>prevents the risk of losing functioning code<\/strong> or breaking test scripts by overwriting files as you can always take out the last working code at any point in time.<\/p>\n\n\n\n<p>Helps you to <strong>identify the difference in any set of files<\/strong>, compare the revisions and merge the changes as per requirement.<\/p>\n\n\n\n<p>It provides you with the <strong>facility to have entirely independent code versions<\/strong> if you prefer to keep different development code, once you are ready, you can merge the files to create a final working version.<\/p>\n\n\n\n<p>It provides an ability to <strong>work as a distributed team with full collaboration across the globe<\/strong> and saves time and additional efforts for everyone. There is no need to wait for others to complete the work.<\/p>\n\n\n\n<p>Once you implement Version Control Systems in your organization you will definitely feel that you made your life easier \ud83d\ude42<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Wrapping-Up\"><\/span>Wrapping Up<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>I hope you liked this article and you now have a fair idea about&nbsp;<strong>Version Control Systems<\/strong>, its benefits and various best practices.<\/p>\n\n\n\n<p>In the coming articles, I am going to cover more about version control.<\/p>\n\n\n\n<p>Till then, stay tuned!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>We read the basics and importance of the SCM process in our last article &#8211; you can check that out here: Software Configuration Management Guide. In this post, we will start with the most important aspect of SCM &#8211; VCS i.e. Version Control Systems. Let&#8217;s get started. What is Version Control System? VCS is the &hellip;<\/p>\n<p class=\"read-more\"> <a class=\"\" href=\"https:\/\/devopsbuzz.com\/version-control-systems\/\"> <span class=\"screen-reader-text\">Version Control Systems &#8211; All You Need To Know<\/span> Read More \u00bb<\/a><\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_uag_custom_page_level_css":"","site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-gradient":""}},"footnotes":""},"categories":[3],"tags":[6,4,5],"featured_image_urls":{"full":"","thumbnail":"","medium":"","medium_large":"","large":"","1536x1536":"","2048x2048":""},"post_excerpt_stackable":"<p>We read the basics and importance of the SCM process in our last article &#8211; you can check that out here: Software Configuration Management Guide. In this post, we will start with the most important aspect of SCM &#8211; VCS i.e. Version Control Systems. Let&#8217;s get started. What is Version Control System? VCS is the root of the tree named SCM &#8211; without Version controlling, the Software configuration management process cannot be assumed. Version control is also known as Revision control a.k.a. source control, is a process to manage a collection of program code and changes that provide you with&hellip;<\/p>\n","category_list":"<a href=\"https:\/\/devopsbuzz.com\/topics\/basics\/\" rel=\"category tag\">Basics<\/a>","author_info":{"name":"Ravi Verma","url":"https:\/\/devopsbuzz.com\/author\/ravi-verma\/"},"comments_num":"12 comments","uagb_featured_image_src":{"full":false,"thumbnail":false,"medium":false,"medium_large":false,"large":false,"1536x1536":false,"2048x2048":false},"uagb_author_info":{"display_name":"Ravi Verma","author_link":"https:\/\/devopsbuzz.com\/author\/ravi-verma\/"},"uagb_comment_info":12,"uagb_excerpt":"We read the basics and importance of the SCM process in our last article &#8211; you can check that out here: Software Configuration Management Guide. In this post, we will start with the most important aspect of SCM &#8211; VCS i.e. Version Control Systems. Let&#8217;s get started. What is Version Control System? VCS is the&hellip;","_links":{"self":[{"href":"https:\/\/devopsbuzz.com\/wp-json\/wp\/v2\/posts\/37"}],"collection":[{"href":"https:\/\/devopsbuzz.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devopsbuzz.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devopsbuzz.com\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/devopsbuzz.com\/wp-json\/wp\/v2\/comments?post=37"}],"version-history":[{"count":18,"href":"https:\/\/devopsbuzz.com\/wp-json\/wp\/v2\/posts\/37\/revisions"}],"predecessor-version":[{"id":1921,"href":"https:\/\/devopsbuzz.com\/wp-json\/wp\/v2\/posts\/37\/revisions\/1921"}],"wp:attachment":[{"href":"https:\/\/devopsbuzz.com\/wp-json\/wp\/v2\/media?parent=37"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devopsbuzz.com\/wp-json\/wp\/v2\/categories?post=37"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devopsbuzz.com\/wp-json\/wp\/v2\/tags?post=37"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}