Git Cheat Sheet
Git Cheat Sheet
This document provides a quick reference to a concise set of commands from various operations in Git, with their
usage for further practice.
$ git init [project-name]
Creates a new local repository with the specified argument
$ git status
Defines the name you want associated with your commit transactions
Defines the email address you want associated with your commit transactions
Prepares the file for commit by logically moving it to the staged area
Shows file differences between staging and the last file version
$ git branch
$ git rm [file]
Deletes the file from the working directory and the staging area
Removes the file from version control but retains the file locally
$ git log
Lists version history in one line, decorated in graphical form for the current branch
$ git pull
Downloads from remote repository and incorporates changes
$ git stash