Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
NFJS Atlanta Git Workshop

NFJS Git Workshop

  • Create a repo
    • git config --global "Tim Berglund"
    • git config --global ""
    • git config --global color.ui auto
    • git init atlanta
  • Add files
    • Create caesar.txt
    • git add caesar.txt
  • Commit Files
    • git commit -m "First commit"
  • Look at diffs
    • git diff
    • git diff --staged
    • git difftool
    • git diff --word-diff
    • git diff HEAD
  • Look at history
    • git log
    • git log --pretty=raw
    • git log --prett=email
    • git log -1
    • git log --stat
    • git log --patch
    • git config --global alias.lg log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%ci) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative --all"
  • Branch
    • git branch feature
    • git checkout feature
  • Merge
    • git checkout master
    • git merge feature
    • git merge feature --no-commit
  • Reflog
    • git reflog
  • Reset
    • git reset --hard <something>
    • git reset --hard HEAD@{1}
  • Log Live Gist
  • Win

This comment has been minimized.

Copy link

@paaone paaone commented Sep 22, 2012


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment