02-Version Control Git PDF
02-Version Control Git PDF
Development
Week 1
Lecture 02 – Version Control and Git
Discord Demo and Commands -
Source code
● One developer is writing new code with new functionality that relies on old
code
Version control’s role is to track every change by each developer such that
concurrent work doesn’t conflict.
What if we don’t use version control?
What if we don’t use version control?
● Don’t know which developer made which change
● Benefits:
○ Traceability
History of changes
● Includes edits as well as creation/deletion of files
● Includes author, date, and any notes that the author included
○ git commit –m “notes go here, can reach a higher character count through Git’s website”
○ But even solo projects can benefit from working on independent streams of changes
○ Also allows the merging of these branches together, enabling developers to make sure that
the changes in each branch don’t conflict
Branching and Merging
Traceability
○ Rather than one place for the full version history, every developer's working copy of the code
is also a repository that can contain the full history of all changes
git pull
git add –A
git push
Demo What about `git branch`, `git checkout –
b …`, `git checkout …`, `git abort`, …?
git clone …
Section 010:
git push
https://canvas.umn.edu/courses/355331
/files?preview=33602471
Git
Lab 1 - Git
Lab 1 is on Friday, January 20th