Automated Version Control
|
|
Setting Up Git
|
Use git config with the --global option to configure a user name, email address, editor, and other preferences once per machine.
|
Creating a Repository
|
|
Tracking Changes
|
git status shows the status of a repository.
Files can be stored in a project’s working directory (which users see), the staging area (where the next commit is being built up) and the local repository (where commits are permanently recorded).
git add puts files in the staging area.
git commit saves the staged content as a new commit in the local repository.
Write a commit message that accurately describes your changes.
|
Exploring History
|
|
Remotes in GitHub
|
A local Git repository can be connected to one or more remote repositories.
Use the HTTPS protocol to connect to remote repositories until you have learned how to set up SSH.
git push copies changes from a local repository to a remote repository.
git pull copies changes from a remote repository to a local repository.
|
GitHub Pages
|
GitHub offers a way hosting a website on their platform.
The pages are stored in a Git repository.
The pages are static in a sense that there are no server-side scripts or databases.
GitHub builds pages from Markdown files with ‘Jekyll’
Jekyll is executed whenever commits are pushed to the server.
|
Ignoring Things
|
|
Collaborating
|
|
Conflicts
|
Conflicts occur when two or more people change the same lines of the same file.
The version control system does not allow people to overwrite each other’s changes blindly, but highlights conflicts so that they can be resolved.
|
Open Science
|
|
Licensing
|
People who incorporate General Public License (GPL’d) software into their own software must make their software also open under the GPL license; most other open licenses do not require this.
The Creative Commons family of licenses allow people to mix and match requirements and restrictions on attribution, creation of derivative works, further sharing, and commercialization.
People who are not lawyers should not try to write licenses from scratch.
|
Citation
|
|
Hosting
|
Projects can be hosted on university servers, on personal domains, or on public forges.
Rules regarding intellectual property and storage of sensitive information apply no matter where code and data are hosted.
|