Let's take a dive into GIT Cheat Sheet

Let's take a dive into GIT Cheat Sheet

Git is a version control system used for tracking changes in computer files.

Git is the free and open source distributed version control system that's responsible for everything GitHub related that happens locally on your computer. This cheat sheet features the most important and commonly used Git commands for easy reference.

git init
<directory>

Create empty Git repo in the specified directory. Run with no arguments to initialize the current directory as a git repository

git clone <repo>

Clone repo located at onto local machine. Original repo can be located on the local filesystem or on a remote machine via HTTP or SSH.

git config
user.name <name>

Define author name to be used for all commits in current repo. Devs commonly use --global flag to set config options for current user.

git add
<directory>

Stage all changes in for the next commit. Replace with a to change a specific file.

git commit -m
"<message>"

Commit the staged snapshot, but instead of launching a text editor, use as the commit message.

git status

List which files are staged, unstaged, and untracked

git log

Display the entire commit history using the default format. For customization see additional options.

git diff

Show unstaged changes between your index and working directory