Show Menu

Git cheatsheet

Initial Config

git config --global "­Tee­rer­ai"
git config --global "­tma­r08­0@a­uck­lan­dun­i.a­c.n­z"
git config --global color.ui "­aut­o"
git config --list
git init
Initial Setup of email and for git

Ignoring stuff

Create file .ignore in project folder and add paths to files to ignore.

Checking changes

git status
git status --ignored
git add somefi­le.txt
git commit -m "some messag­e"
git log 
git diff
git diff --staged


git remote -v
git push origin master
git pull origin master

Exploring History

X commits from the last one where X is int.
Last commit
git diff HEAD~X
diff for head-X
git checkout HEAD~X
restores head-X


No comments yet. Add yours below!

Add a Comment

Your Comment

Please enter your name.

    Please enter your email address

      Please enter your Comment.

          Related Cheat Sheets

          Git Cheat Sheet