Show Menu
Cheatography

Git Cheat Sheet (DRAFT) by

A comprehensive Git cheat sheet, including config, ignoring local changes, stashing, branching and more.

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

Ignore Changes to Local Copy of Versioned File

$ git update­-index --assu­me-­unc­hanged <fi­le>
Ignore changes to <fi­le>
$ git update­-index --no-a­ssu­me-­unc­hanged <fi­le>
Unignore changes to <fi­le>
$ git ls-files -v | grep '^h'
Show ignored files

Stash and Restore Changes

$ git stash
Store changes
$ git stash list
Show stashed changes
$ git stash apply
Apply more recently stashed change
$ git stash apply stash@{2}
Apply named stashed change
$ git stash drop
Drop most recently stashed change
$ git stash drop stash@{2}
Drop named stashed change
$ git stash pop
Apply and drop in one step (can be used with a named stash)
 

teety

tddrtd
dfgdfgdfg
 
dfgdfgdfg
dgdg