layout: true
Class 2: GITing started
--- class: center, middle # Class 2: GITing Started `git init; git status; git log; git add; git commit;` --- # Overview 1. Announcements 2. Review 3. Q&A 4. Extras 5. Basic assignment --- # Announcements * Basic - Intro due tonight (September 29) * Basic/Adv - Git 1 due October 11 * Today is Mid-Autumn Festival! --- # Review ## Git * Git is a graph * Commits are nodes * Branch represents a history * History is a sequence of commits leading back in time --- # Review ## Git * `git init`: initialize repo * `git add`: stage files * `git commit`: commit changes * `git branch`: create branches * `git switch`: switch branches --- # Q&A --- # Extra * `git diff` * `git stash` * `git pop` * Don't version junk files * `.gitignore` --- # Activities ## dotfile repo * Create a repo that has your configuration files * Useful if you need to set up a new computer! --- # Activities ## GitHub pages * Can host static webpages for you * Can also use static site generators * https://pages.github.com/ --- # Activities ## Version a project * Have an assignment in 280/281/etc.? * Try versioning it with Git! * Try using a .gitignore --- class: center, middle # Basic assignment --- class: center, middle # Addenda --- ### Core commands * `git init` * `git status` * `git log` * `git add` * `git reset` * `git commit` * `git branch` * `git checkout` * (`git switch`) * (`git restore`) * `git merge` --- ### Remote and Collaboration commands * `git clone` * `git fetch` * `git pull` * `git push` * `git remote` ### Additional Commands * `git help` * `git stash` * `git show` * `git diff` * `git rebase` * `git blame`