Joseph V. Casillas
From Proposal to Publication:
Pathways to Open Science | 07-14-2021
joseph.casillas@rutgers.edu | |
@jvcasill | |
https://github.com/jvcasillas/github_workshop | |
https://www.jvcasillas.com/github_workshop/index.html |
What is version control and why do I care?
Get familiar with Git/Github
get familiar with git/github understand conceptually what it is, what it does, what it is for learn how it can be a tool for our research (safety measures, promote open science) open doors for collaboration
Version control is a system that records changes to a file or set of files over time so that you can recall specific versions later
This process should be version controlled!
This project should be version controlled!
Git
Github
Gitlab
Bitbucket
Installation and setup: https://git-scm.com/book/en/v2/Getting-Started-Installing-Git
Troubleshooting: https://happygitwithr.com/install-git.html
You should have this already 🙏
It's free
Use an academic email if you have one (more perks)
Give consideration to your username
You should have this already 🙏
This will make interacting with Git much easier
You can download the app here: https://desktop.github.com
You should have this already 🙏
Git keeps track of incremental changes in project files
We can think of it like taking snapshots of a repository (project) 📷
We access Git via the command line
Git keeps track of incremental changes in project files
We can think of it like taking snapshots of a repository (project) 📷
We access Git via the command line
An online interface to Git
A place to store repositories (projects)
Owned by microsoft 😞
profile, repos, public, private not to late to catch up
a version control system that let's you manage and keep track of your source code history via repositories
a cloud based hosting service that lets you manage Git repositories
Option a) Click the New icon anywhere
Option b) Click on the profile icon in the
upper right hand corner, from the
dropdown menu select Your repositories,
click the New icon
Repositories are projects
We commit changes to the repository
README files have special status on Github
Remember to think carefully about names
Avoid spaces and uncommon characters (if possible)
Clone my-repo repo on to your computer
(Github desktop: File > Clone repository)
Edit the README.md file using a text editor
and put some text in the body
Save everything, commit the changes to origin with
an informative message
Push changes from your local (cloned) repo to origin (the cloud)
Check github to see if it worked
We clone repositories from origin to our computers (local copies)
We work like normal and commit changes
When we finish we push changes from our local copy to origin
The changes are then visible on Github
Always think carefully about where projects live
Practice this procedure (clone > edit > commit > push) with dummy repos to get the hang of it
Don't be afraid to burn the house down
Fork the github_practice repo
Clone repo to your computer
Open the README.md file
Edit README.md
Commit changes
Push changes to origin (your copy on Github)
Submit a pull request
Fork the github_practice repo
Clone repo to your computer
Open the README.md file
Edit README.md
Commit changes
Push changes to origin (your copy on Github)
Submit a pull request
We can fork other peoples repos
We can then clone our forked copy and make changes
Edit > commit > push
We can send our modifications to the original repo via pull requests
Learn from other people by forking their projects 👍
It is extremely fulfilling to contribute to other people's projects 😄
If you get stuck/make a mistake you can always burn the house down 🔥
there are more
Branches
Merge conflicts
The command line
joseph.casillas@rutgers.edu | |
@jvcasill | |
https://github.com/jvcasillas/github_workshop | |
https://www.jvcasillas.com/github_workshop/index.html |
Hint: continue for more tips and tricks!
.rproj
files create an independent RStudio environment that limits the scope of your R session to the project in question.
.rproj
files create an independent RStudio environment that limits the scope of your R session to the project in question.
.rproj
files create an independent RStudio environment that limits the scope of your R session to the project in question.
You probably don't spend much time thinking about how you name files and documents
You should
The idea is to follow a few simple guidelines that will make facilitate organizing your projects and make the file structure easily searchable
Use descriptive names
Experiment
qualifying_paper_1
no capitals, no spaces (use _
or -
)
Experiment for syntax class
semantic_predictability_exp_1
no non-standard characters
Analysis of ð for ICPhS 2019
spirantization_icphs_2019
Use descriptive names
Experiment
qualifying_paper_1
no capitals, no spaces (use _
or -
)
Experiment for syntax class
semantic_predictability_exp_1
no non-standard characters
Analysis of ð for ICPhS 2019
spirantization_icphs_2019
Analysis 1
01_analysis
2019-02-20_data_download
Use descriptive names
Experiment
qualifying_paper_1
no capitals, no spaces (use _
or -
)
Experiment for syntax class
semantic_predictability_exp_1
no non-standard characters
Analysis of ð for ICPhS 2019
spirantization_icphs_2019
Analysis 1
01_analysis
2019-02-20_data_download
dissertation
(← repo)production_semantic_processing_las
prod_perc_bilabials_jphon
dissertation
(← repo)production_semantic_processing_las
prod_perc_bilabials_jphon
.rproj
filesIn the programming world committing to master is a nono. Why?
Most developers use git as version control for software
The master branch is usually left for public releases
As such it should always work
You might break something
You might get complicated merge conflicts
Person A is working on the same file as Person B, they both make changes and Person A tries to submit a pull request to master on a file that is different from when (s)he started
essay_final_version3_for_real.docx
)essay_final_version3_for_real.docx
)essay_final_version3_for_real.docx
)(medium danger)
(medium danger)
(medium danger)
(danger!)
(medium danger)
(danger!)
(medium danger)
(danger!)
(low danger)
(medium danger)
(danger!)
(low danger)
(medium danger)
(danger!)
(low danger)
(medium danger)
(danger!)
(low danger)
joseph.casillas@rutgers.edu | |
@jvcasill | |
https://github.com/jvcasillas/github_workshop | |
https://www.jvcasillas.com/github_workshop/index.html |
Keyboard shortcuts
↑, ←, Pg Up, k | Go to previous slide |
↓, →, Pg Dn, Space, j | Go to next slide |
Home | Go to first slide |
End | Go to last slide |
Number + Return | Go to specific slide |
b / m / f | Toggle blackout / mirrored / fullscreen mode |
c | Clone slideshow |
p | Toggle presenter mode |
t | Restart the presentation timer |
?, h | Toggle this help |
Esc | Back to slideshow |