Why Use Git Instead of a Legacy Version Control System?

Why use Git? Well, we will tell you.

Better history, less fear

With a typical version control system, the workflow is:

  1. Check out the project from the central repository
  2. Make modifications
  3. Check in/submit/commit changes back to the central repository.

Depending on the change, step 3 can strike fear into the person doing the change, since as soon as the “enter” key is pushed, the changes might introduce a bug into everybody’s code.

As a result, the natural tendency is to submit changes to the central repository as infrequently as possible: Pack in more than one bug fix when pushing code to the central repository. Maybe even toss in a new feature or two with each checkin.

However, with git, you have the ability to commit changes to your own local, private branch as often as you’d like, without modifying the central repository. You can make a separate decision on when you would like to push your local changes to the public repository. The work flow for git has an extra step:

  1. Check out the project from the central repository
  2. Make modifications
  3. Check in/submit/commit changes to the local repository
  4. Check in/submit/commit local changes back to the central repository.

The result:

  • You can and likely will make more commits to your local branch.
  • More commits mean a better history of the changes you’ve made to the repository: You can look back at the commit history and see which lines of code were changed for a particular bug fix, rather than having one big set of changes that fixed 3 different bugs.

Flexibility in where you work

When you check out a git project, you get the whole repository including all of its history. It contains the same contents as the original contents. You can do local commits, create new branches, and work as much as you’d like, without needing to be connected to the network or central repository.

When you’re ready to check in to a central repository, connect to a network and push the changes in.

Branching is easy

Branching on some legacy version control systems is left to experts and VCS administrators. Not so with git: Think up a new feature? Create a branch and start working on it immediately. Jump between branches. Merge branches back into the main branch.

Stash the current changes, do work on another branch, check in the changes in the other branch, then continue back where you did the “git stash” (yes, there really is a “git stash” command).

Flexible and Powerful

Git gives you all you need for basic revision control, of course. But it also gives you the tools needed for advanced revision control.

Git was designed and written by the creator of Linux, which has a similar elegant, simple, yet very flexible and powerful design. Many commands can be integrated together and used as needed which makes it even more powerful than the single commands by themselves.

Git is like Linux: It not only lets you see how it works, but also gives you the ability to creatively use the git tools to create something bigger or customised for your requirements.

Git is Fast

Everything about git is fast. It doesn’t slow you down, and doesn’t get in the way.

Recent Articles

Where Do I Get Git?

Where do you get git? We have the answer to that for Linux (Ubuntu, Debian, and Red Hat), Windows, and Apple OS as well as over 30 free git tutorials.

What is the deal with the Git Index? What is the Git Index?

The git "index" is where you place files you want committed to the git repository. Learn more about the git index and git commit by selecting this link.

What Every VCS Must do

Version Control System ("VCS") need to be able to provide to its users? GitGuys explains exactly what it needs to include and provides tutorials on Git.

Visualising Branches And Their Commits

We explain and discuss the use of the git show-branch, gitg, gitk and qgit in this Tutorial. Complete with examples.

“Tracking Branches” And “Remote-Tracking Branches”

Both Tracking Branches and Remote Tracking Branches are created on the git client when a git clone command is used.

Related Stories

Leave A Reply

Please enter your comment!
Please enter your name here

Stay on op - Ge the daily news in your inbox