Oregon State University
2025-01-08
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
upstream
for the remote repo:upstream
main branch into your main branchWhat if you (or someone else) made a change in your fork?
pull
= fetch
& 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)
For solo projects:
For multi-person projects:
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
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.
“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
Pick a license when creating a project, and put as LICENSE.txt
in your repo.