Git Quick commands

  1. git init
  2. git add —– this add all the changes to stage area
  3. git commit -m
  4. git status
  5. git diff xxx
  6. git log

git log –pretty=oneline

git log –all –decorate –oneline –graph = commit history graph

  1. git reflog
  2. go back last version —— git reset –hard HEAD^
    or specific version ——- git reset –hard xxxxxx
  3. check out file ——- git checkout — xxxx