Version control systems are a category of software tools that help a software team manage changes to source code over time. Version control software keeps track of every modification to the code in a special kind of database. If a mistake is made, developers can turn back the clock and compare earlier versions of the code to help fix the mistake while minimizing disruption to all team members.1
Git is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency.2
Table of contents
- Centralized vs Distributed Version Control
- Hosting Services for version control using Git
- References / Documentation
- OS Tools Installation
- Global and Local Setting
- Git using SSH Key Pairs
- Related Topics
The Source Code Control System (SCCS) is a software tool designed to help programming projects control changes to source code. It provides facilities for storing, updating, and retrieving all versions of modules, for controlling updating privileges for identifying load modules by version number, and for recording who made each software change, when and where it was made, and why. This paper discusses the SCCS approach to source code control, shows how it is used and explains how it is implemented.3
The Revision Control System (RCS) manages multiple revisions of files. RCS automates the storing, retrieval, logging, identification, and merging of revisions. RCS is useful for text that is revised frequently, including source code, programs, documentation, graphics, papers, and form letters.
CVS is an acronym for the "Concurrent Versions System". CVS is a "Source Control" or "Revision Control" tool designed to keep track of source changes made by groups of developers working on the same files, allowing them to stay in sync with each other as each individual chooses. CVS is free and runs on many computers and operating systems — such as WindowsNT, Win95, Mac, etc. To install and build CVS, your computer must have a C-compiler, RCS, and PERL accessable from your computer (at least this is what is required for UNIX platforms). It is also available for the Windows NT operating system (although no NT clients I know of have the software installed).5
Subversion is an open source version control system. Founded in 2000 by CollabNet, Inc., the Subversion project and software have seen incredible success over the past decade. Subversion has enjoyed and continues to enjoy widespread adoption in both the open source arena and the corporate world.6
Git is a mature, actively maintained open source project originally developed in 2005 by Linus Torvalds, the famous creator of the Linux operating system kernel.7
Centralized version control systems are based on the idea that there is a single “central” copy of your project somewhere (probably on a server), and programmers will “commit” their changes to this central copy.8
- Subversion (SVN)
These systems do not necessarily rely on a central server to store all the versions of a project’s files. Instead, every developer “clones” a copy of a repository and has the full history of the project on their own hard drive. This copy (or “clone”) has all of the metadata of the original.9
- GitHub (Microsoft) - Founded in 2007, GitHub has brought millions of developers together to discover, share, and build better software.10
- BitBucket (Atlassian) - Bitbucket is more than just Git code management. Bitbucket gives teams one place to plan projects, collaborate on code, test, and deploy.11
- AWS CodeCommit (Amazon) - AWS CodeCommit is a fully-managed source control service that makes it easy for companies to host secure and highly scalable private Git repositories.12
- GCP Cloud Source Repositories (Google) - Google Cloud Source Repositories are fully-featured, private Git repositories hosted on Google Cloud Platform.13
- Commit Often, Perfect Later, Publish Once: Git Best Practices
- A successful Git branching model
- The official and comprehensive man pages that are included in the Git package itself.
- Understanding the Git Workflow
- Git Basics - Getting a Git Repository
- Git - Documentation
- Why Google Stores Billions of Lines of Code in a Single Repository
- The entire Pro Git book, written by Scott Chacon and published by Apress.
|Tech Talk: Linus on Git|
|GitHub Tutorial for Beginners|
|The Basics of Git and GitHub|
$ sudo add-apt-repository ppa:git-core/ppa $ sudo apt-get update $ sudo apt-get install git
pkg install git
Installing Git with Chocolatey
PS C:\> choco install git
Now that you have Git on your system, you’ll want to do a few things to customize your Git environment.14
$ git config --global user.name "John Doe" $ git config --global user.email email@example.com $ git config --global core.editor "/usr/bin/vim" $ git config --global core.pager 'more'
If you are working with multiple teams you might want different email addresses associated with each of those teams. You can set the User Name and Email Address for each Git repo using the following commands:
$ git config --local user.name "John Doe" $ git config --local user.email firstname.lastname@example.org
One possibility to authenticate uses the "HTTPS" protocol which you probably already know from your browser. Although this is very easy to use, a lot of system administrators use the also very common "SSH" protocol for various reasons. In this scenario, when it comes to authentication, you will most likely meet "SSH Public Keys".
For this type of authentication, a two-part key is used: a public and a private one. The private key (as the name implies) must be kept absolutely private to you under all circumstances. Its public counterpart, in contrast, is supposed to be installed on all servers that you want to get access to.