Oregon State University
2025-01-08
important_code.py
important_code-2.py
important_code-fix.py
important_code-final.py
important_code-final-4Apr.py
important_code.py
important_code.py
important_code.py
important_code.py
important_code.py
Centralized:
Distributed:
Git is a knife whose handle is also a knife. – Philip Guo
~/analysis_code $ ls
~/analysis_code $ ls -A
.git
~/analysis_code $ cd .git && ls -A
HEAD config description hooks index info logs
Tip
Try this yourself.
Tip
Try this yourself.
Snapshot of repository = revision
Committing a revision:
Tip
Try this yourself.
Bad commit message:
Better commit message:
Un-add a file that has been staged:
Reset all tracked files to previous commit:
Remove uncommitted changes:
~/analysis_code $ git branch
* main
~/analysis_code $ git branch experimental
~/analysis_code $ git branch
experimental
* main
~/analysis_code $ git branch new
~/analysis_code $ git branch
experimental
* main
new
~/analysis_code $ git branch -d new
~/analysis_code $ git branch
experimental
* main
~/analysis_code $ git switch experimental
~/analysis_code $ git branch
* experimental
main