Lesson 1

Udacity – How to Use Git and GitHub

Lesson 1

File compare

  • fc for Window command prompt
  • diff for Mac and Linux command prompt (-u for unified format)

Git Commands

  • git log – view history of commit (–stat statistic of each file).
  • git diff <id1> <id2>- compare different commit
  • git –version
  • git clone <link> – copy entire history of the repository
  • git config –global color.ui auto (get colored diff output, –global for all git projects)
  • git checkout <id> – to run a previous commit (detached HEAD state, where HEAD is the commit you are currently on).
  • git config –global user.name <user string> (must do this before allow commit)
  • git config –global user.email <email string> (must do this before allow commit)
  • git config –global core.editor <text editor> (setup default text editor. e.g vim)
  • git config –global push.default upstream (?)
  • git config –global merge.conflictstyle diff3 (?)

Guide lines and tutorials

  • One commit per logical change
  • wiki page for installation