Clone: make local copy of any repository (Git)
Fork: Remote repository connected to/aware of the "upstream" repo it was cloned from (GitHub)
How does Fran keep local repo up to date with the original?
$ git clone https://github.com/[you]/analysis_code.git
(replace "[you]" with your username)
$ git remote add upstream \
https://github.com/Research-Software-Development-Lessons/analysis_code.git
$ git remote -v
$ git fetch upstream
$ git merge upstream/master
$ git push
(this goes to "origin master")
$ git pull
"pull" = "fetch" and "merge" for "origin master"
When fetching, merging, and/or pulling remote changes, you may encounter conflicts
To solve: just follow the directions!
(In-class example)
Modern, GitHub-based version of emailing someone a patch
Pull Requests (or PRs) consist of sequences of patches, based on a history of Git commits
$ git clone ...
$ git checkout -b newfix
$ git commit -am "fixes problem in upstream project"
$ git push origin newfix
Try to submit shorter Pull Requests when possible, as they are easier to review and merge
If the project uses testing, make sure to add a new test (or modify an existing one) to reflect your change. More on tests later!