Week4 M
Week4 M
Lab 4
(Un)expected problems
bug fixes
Enhancements
Make code more efficient (memory, execution time)
Backups
Timestamps
Who made the change?
Where was the change made?
A way to communicate changes with team
Developers can
communicate changes
between each other
without going through a
central server
Centralized
Distributed
Cons
Single point of failure (no
backups!)
Cons
long time to download
A lot of disk space to store
all versions
Working Copy
A local copy of files from a repository at a specific
time or revision
More Terminology
Check-Out
The act of creating a local working copy from the
repository
Commit
The action of writing the changes made in the
working copy back to the repository
Big Picture
checkout
Git Workflow
Git Architecture
HEAD
Refers exclusively to the currently active (checked out) head
Branch
Refers to a head and the entire history of ancestor commits
preceding that head
Master
The default head name that git creates when the repo is first
created. It refers to the default branch created in the repository.
Commits
git add //adds files to the index
git commit // changes are added to the repo
Getting information
git help, git status, git log, git show, git diff
$ git diff
Shows changes we made compared to index
git revert
Reverts a commit
Does not delete the commit object, just applies a
patch
Reverts can themselves be reverted!
Overview
clone
Lab 4
GNU Diffutils uses " ` " in diagnostics
Example: diff .
Output: diff: cannot compare `-' to a directory
Want to use apostrophes only
Backporting
Taking a certain software modification (patch)
and applying it to an older version of the
software than it was initially created for.
Steps
1) Installing Git
Ubuntu: $ sudo apt-get install git
SEASnet
Git is installed in /usr/local/cs/bin
Add it to PATH variable or use whole path