Show Menu
Cheatography

Git Bash Cheat Sheet Cheat Sheet (DRAFT) by

Edit description Edit description Edit description

This is a draft cheat sheet. It is a work in progress and is not finished yet.

01 Starting a project

git init [project name]
Create a new local repository in the current directory names [project name].
git clone <pr­oject ssh url>
Downloads a project with the entire history using the SSH URL from GitLab.

02 Make a Change

git status
Displays the status of your working directory. Options include new, staged, and modified files. It will retrieve branch name, current commit identi­fier, and changes pending commit.
git add [file]
Add a file to the staging area. Use. in place of the full file path to add all changed files from the current directory down into the directory tree.
git add .
Stage all files
git commit -m "­commit messag­e"
Create a new commit from changes added to the staging area. The commit must have a message!