General Introduction
|
|
Beginning with the Terminal
|
Use pwd to show in which folder you are.
Use ls to list the files of a folder
Use ls -a to show all files and folders
Use cd to change the folder
Use cd .. to go back one folder
Use mkdir to create a folder
Use touch to create an empty file
|
Basics
|
|
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
|
|
Ignoring Things
|
|
Remotes in GitHub
|
A local Git repository can be connected to one or more remote repositories.
Use the SSH protocol to connect to remote repositories.
git push copies changes from a local repository to a remote repository.
git pull copies changes from a remote repository to a local repository.
|
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
|
|
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.
|
Using Git from RStudio
|
|
Using Git with EVE
|
Using git clone from a project you have on GitHub to synchronize on EVE.
Push/pull before making changes to both the EVE and local git directories to avoid conflicts
Alterntively, create a new branch to work on EVE
|
Connecting GitHub with Zenodo
|
|
Navigating and Searching code on GitHub
|
Using GitHub commit history allows you to get access directly to your code.
You can look at specific files, have them as raw version, or acces their history
It is possible to select a specific line of code to link to it or cite it
Through the settings tab of a project you can collaborators
GitHub issues are a good way to keep track of progress, bugs, and ideas on a project
|
Extra time
|
|