Git

Git happens

Git != Github

  • People host git repositories on github
  • Git was developed in 2005 by Linus Torvalds
  • Git == Version Control!
git status
git add <file1> <file2>
  • Adds file to be "staged"
  • git add .
git commit -m "message"
  • Creates snapshot of all staged files
  • Adds the message & creates SHA

akjh20d8va vs dev

git checkout -b branch_name

create a branch and move your HEAD there

git branch branch_name
git checkout branch_name

Some Tips

(For your project)

Committing 

  • Each commit should be a related feature/fix
  • Have well thought out commit messages
  • Squash your commits into meaningful ones

Useful Git Tools

  • git log --graph --oneline --all 
  • git log
  • git diff

ScmPuff (Mac)

Demo Time!

Discussion 6 - Git

By Charles Xue

Discussion 6 - Git

  • 1,045