Git is a type of version control software that makes it easy for multiple people to collaborate on a codebase.
How does git work?
Git works by saving multiple copies of the changed files. This allows software developers to make changes and then reverse those changes if the new code has bugs. Git also tracks when files are changed which simplifies the process of combining multiple versions of code.
What is the history of git?
Git was originally developed by the Linux development community in 2005 to help streamline the Linux kernel development process.
Note: This tutorial was created using git version 2.24.3.
Basic Concepts
Cloning: This is copying the entire codebase locally to your computer.
Origin: The main software release.
Branch: A copy of a the code that allows you to work on a feature without messing with the main code release.
Switch Branch: Look at a different snapshot of the repository.
Merge: Allows you to merge changes from another branch or the origin into the branch you are working on.
Commit: A snapshot of the current state of your branch.
Adding: Which files need to be in this commit.
Pull: Download possible changes in your branch from server/website.
Push: Send local changes on a branch to the server/website.
Repo: Short for repository.
Three Steps
There are three steps for this tutorial that focus on starting out, branching, and working with a remote server.
The starting out section teaches you how to locally start a project and save your progress.
The branching section teaches you how to create multiple versions of your project and then combine those versions together.
The remote server section teaches you how to pull and push code changes to and from a remote server.
Open up your console window and let's get started.