What Is Git? Distributed Version Control Overview
Git is a distributed version control system that tracks changes to files and coordinates work on those files among multiple people. Version control systems are handy for keeping track of file versions, which is useful for tracking your code, scripts, and text information. Git is one of the best open-source, cross-platform version control solutions: it enables distributed repository management and works fast over HTTP and SSH protocols, with a command-line utility or a Graphical User Interface.
Personally, I have found several commands to be essential for tracking my thesis
text sources (LaTeX) and versions of code.
In this brief tutorial I will share these commands with you.
For simplicity, I will give a starting point of setup β
initialising a Git repository and basic usage scenarios β in just 10 minutes of your time.
Installing Git on macOS with Homebrew
Since I work on macOS, I use the Homebrew package manager to install Git.
To install Homebrew, we can get it from https://brew.sh or with:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
Next, Git installation with Homebrew, and Gitβs location and version:
# Installing git with brew
brew install git
# Checking its path
which git
# Checking its version
git --version
Git Setup: Working Between Local and Remote Repositories
π Subscribe to keep reading.
Creating a Remote Git Repository on GitHub or Bitbucket
π Subscribe to keep reading.
Initializing a Local Git Repository with git init
π Subscribe to keep reading.
Configuring Git User Name and Email with git config
π Subscribe to keep reading.
Adding and Committing Files with git add and git commit
π Subscribe to keep reading.
Pushing and Pulling with Git Remote Repositories
π Subscribe to keep reading.
Essential Git Workflow Commands Reference
π Subscribe to keep reading.
Git Authentication with SSH Keys (ssh-keygen)
π Subscribe to keep reading.
Git Authentication with GitHub Personal Access Tokens
π Subscribe to keep reading.
Common Git Errors and Fixes
π Subscribe to keep reading.
References and Further Reading
π Subscribe to keep reading.
Git Setup and Workflow Summary
π Subscribe to keep reading.
You've hit a Deep Dive tutorial.
I spend dozens of hours researching, coding, and breaking things to write these guides. This content is free, but reserved for my subscriber community. Drop your email below to unlock this guide (and all past/future deep dives):
Full content temporarily unavailable β refresh in a moment
Already a subscriber? Use the magic link from your last newsletter, or reset your password.
Log in to unlock
New subscribers get an inbox mail: Set a password to unlock articles. The form does not log you in β use the same email afterwards.