Check Out Git

in coding •  7 years ago  (edited)

This is the first in a set of cliff notes as I learn powerhouse versioning tool /git/. It helps all of us communicate in New York and even to Paris and back when we need.

I’m starting to be not bad at using it. At the beginning I was pretty bad, though, so I’ll start with the three most basics terms. Understand these and you’ve got all you need to get started:

"committed" which means the data is saved and stored on the local database.

"modified" which means a file was changed but not committed.

"staged" which means a file is prepared for the next commit.

Git is a good tool because it is easy to use. It’s a distributed repository.

It’s also a versioning control system (VCS):
It records file changes.
Allows you to revert the file to before it was changed.
Color codes and compares changes and identifies who made the changes.

You might be familiar with rcs (I wasn't). It’s a popular local VCS tool. At any time It can recreate by adding up all the patches.

VCS is a single server versioning control systems, and it provides advantages over local versioning control systems, like
(1) Collaborating developers know what others are working on (for the most part)
(2) Granular admin controls
(3) centralized work for admin

Disadvantage to a local versioning system:
(1) single point of failure
(2) hard disk corruption risk.

Git is more powerful than a local versioning tool, because it’s a decentralized control system.

Git came about after a disagreement with Bitkeeper, the proprietary DVCS that stopped agreeing with the Linux Kernel open source software project. Linus Torvalds, creator of Linux, lead the way to a new system founded on the following principles.

  • speed
  • simple design
  • strong support for non-linear development
  • fully distributed
  • handling large projects

Sure enough, git is incredibly fast. It’s efficient on large scale projects, and has a magnificent branching system for non-linear development.

Here are the basics

  • Git basics

As they say, forget what you know. Git is different. Git stores modified files and links to the non-modified files from before. It takes a stream of snapshots. Think of Git as a mini filing system copied from the previous generation.

Most of the operations are local, the entire history of the project included. This enables you to work offline easily. Make your commit, and when you reconnect to the network it will be pushed to your branch.

Git has integrity. First and foremost, understand you /can't lose anything/. Everything is check summed before stored, then referred by checksum. It impossible to make a change without directory knowing about it.

Disabling information loss is a crucial feature.

A SHA-1 hash (a 40-character string of hexadecimal characters (0-9 and a-f) is calculated based on the file contents.

We will wrap up with the three states in which your files can be. Again, remember these three terms you’ll be able to take the next step:

"committed" which means the data is saved and stored on the local database.

"modified" which means a file was changed but not committed

"staged" which means a file is prepared for the next commit.

Tune in next time…

-Zef

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!