modules

Git Introduction

Git (/ɡɪt/[8]) is a version control system (VCS) for tracking changes in computer files and coordinating work on those files among multiple people. It is primarily used for source code management in software development,[9] but it can be used to keep track of changes in any set of files. As a distributed revision control system it is aimed at speed,[10] data integrity,[11] and support for distributed, non-linear workflows.[12] -Wikipedia

Git is an open source program for tracking changes in text files. -GitHub (https://help.github.com/articles/github-glossary/)

What is Git?

Keeping track of file versions is hard.

So what is Git, and why does it help us?

Above all else, Git is a fast and distributed version control system, that allows you to efficiently handle projects large and small.

Here are some problems we face as developers, and how git solves them:

Reverting to past save points (commits)

Git allows us to make save points at any time. These save points are called ‘commits’. Once a save point is made, it’s permanent, and allows us to go back to that save point at any time. From there, we can see what the code looked like at that point, or even start building off that version.

Keeping track of what each save point ‘meant’ (commit messages)

Every commit has a description (commit message), which allows us to describe what changes were made between the current and previous commit. This is usually a description of what features were added or what bugs were fixed.

Additionally, git supports tagging, which allows us to mark a specific commit as a specific version of our code (e.g. ‘2.4.5’).

Comparing changes to past save points (diff)

It’s often important to see content of the actual changes that were made. This can be useful when:

Git allows us to easily see these changes (called a diff) for any given commit.

Non-linear workflow (branches)

Git enables you to work using a non-linear workflow. This means that you can have multiple versions of a project or “branches” with different save points, or “commits”, simultaneously within the same folder and easily toggle bgttween them. You can split new branches off a project when you’re looking to experiment or implement a new feature, and you can merge those branches back into the main (formerly known as “master”) branch when you’re ready to incorporate them into a project.

Fearlessness in making changes

In developing software, we often want to experiment in adding a feature or refactoring (rewriting) existing code. Because git makes it easy to go back to a known good state, we can experiment without worrying that we’ll be unable to undo the experimental work.

Git versus GitHub

Learn More: https://jahya.net/blog/git-vs-github/

Some Vocabulary

The basics:

Working with others: