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/SoftwareDevEngResearch/analysis_code.git
$ git remote -v
$ git fetch upstream
$ git merge upstream/main
$ git push
(this goes to "origin main")
$ git pull
"pull" = "fetch" and "merge" for "origin main"
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!
Facts and ideas are not copyrightable.
Expressions of ideas are copyrightable.
Game rules are not copyrightable (chess, Go, football, Dungeons & Dragons).
Expressions of game rules are copyrightable.
A function that computes standard deviation of values: name choices and concept of the function are not copyrightable.
The std()
code actually computes the standard deviation is copyrightable.
"Right of First Publication": copyright automatically goes to the first creator of any creative work
(Even if not explicitly specified)
Consequence: if you post software to GitHub without an explicit license, then you own the copyright—even if openly and publicly visible.
By default, no one else is legally allowed to use or modify your work.
All software codes you make publicly available should be accompanied by a software license describing the terms by which others may use and/or modify your code.
Alternatively, you can put work into the public domain: "This work has been placed in the public domain."
Free for anyone and everyone to use and modify.
Literature examples: Sherlock Holmes, Frankenstein
(There are some tricky issues internationally, however.)
Kinds of software licenses: proprietary, and free/open source (FOSS, FLOSS, OSS)
Pick an existing license. Do not create your own.
FOSS categories: permissive, and "copyleft"
Permissive licenses: BSD 3-clause, MIT; allow further distribution under any license
Copyleft licenses: GPL; require modifications to be shared under the same license ("viral")
When in doubt, use a permissive license like the BSD 3-clause or MIT licenses.
Licenses: CC BY, CC BY-SA, CC BY-NC, CC BY-NC-NC
Patents: cover ideas and concepts; modern issues with "patent trolls"
Trademarks: symbols that represent a business or organization
Export control: government may forbid the transfer of source code (and data, ideas) to another country or foreign national without permission
HIPAA compliance: software that deals with human patients must be anonymized
LICENSE.txt
in your repo.