Version Control: a Quick Overview

What is Version Control?

Version control can be defined as a system that allows us to register, monitor, and manage changes made in a local or remote file system; it records when, by whom, and what changes were made.

 In addition, version control is beneficial because it allows us to return to a previous version of a project, compare changes throughout time, see when a modification is causing a problem, and more.

 

Version Control Categories

Among the different categories of version control systems, we find:

Centralized systems: the project is saved in a centralized server where the software is programmed and worked on. 

Distributed systems: each team member keeps a complete local copy of the whole project. 

 

Software

Network Architecture

Conflict Resolution

Development Status

Bitbucket Compatibility

Git

Distributed

Fusion

Active

Yes

Mercurial

Distributed

Fusion

Active

Yes

SVN

Client-server

Fusion or block

Active

No

CVS

Client-server

Fusion

Maintenance only

No

 

Examples of Version Control Systems

Git / CVS  / Apache Subversion (SVN) / Mercurial / Monotone 

Benefits

The following are just some of the benefits of using these systems:

 

  • All changes made to the repository are registered and recorded
  • By creating branches and fusions, all team members can work on the project simultaneously
  • Each change can be tracked and linked to project management software

What is Git?

Git is a distributed version control system. It provides a shared workspace for all team members involved in the project. Apart from being open source, it is actively maintained by a big community and is secure. 

Git can keep a complete record of all changes. It was designed while considering performance, security, and flexibility. 

  • Performance: Git uses a combination of delta encoding (stores differences in content) and compression. It also explicitly stores content from directories and all versions’ metadata objects.
  • Security: All objects in Git’s repository are protected by a cryptographically secure hash algorithm called “SHA1”. 
  • Flexible: It can work with different types of non-linear development flows in both big and small projects. It is also compatible with several systems and protocols. 

Commonly Used Commands

  • git init: create a new repository 
  • rm -rf .git: delete a repository 
  • git clone + URL: clone a remote repository 
  • git remote: check which remote server has been configured 
  • git branch: check created branches
  • git branch feature-branchname: create a branch feature
  • git branch -d "branchname": delete branch 
  • git status: check changes in stage
  • git add . : add changes to stage
  • git commit -m "description ": save changes added to stage
  • git checkout branchname: change to the selected branch
  • git checkout -b branchname: create a branch and change to that same branch
  • git log –oneline: check commits 
  • git log --oneline --grahp --all –decorate: check commits with greater detail 
  • git push: send all changes to a remote repository 
  • git pull: pull data from a remote repository and merge the remote repository with a local repository.
  • git fetch: fetch data from a remote repository without merging it with a local repository.

Key Takeaways

  • Version control is a system that allows us to register, monitor, and manage changes made in a local or remote file system.
  • A register of all changes, the possibility of several team members working on the project at the same time, and linking with project management software are just some of the benefits brought by version control.
  • Among these systems, one of the most commonly used is Git, which, apart from being an excellent open-source tool, is very well documented. It is also perfect for project management in terms of functionality, performance, security, and flexibility.

About Encora

Fast-growing tech companies partner with Encora to outsource product development and drive growth. Contact us to learn more about our software engineering.

Contact us

 

Share this post