Skip to content
This repository was archived by the owner on Dec 12, 2025. It is now read-only.

Commit

Permalink
Expand and refine Git materials
Browse files Browse the repository at this point in the history
  • Loading branch information
tmiddelkoop committed Jun 4, 2024
1 parent 4992780 commit b15f66c
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 10 deletions.
31 changes: 25 additions & 6 deletions Notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* Username: Enter username (your_name), which is the same as the first part of your your_name@skc.edu email address.
* Click on "Complete Account" (you may need to click on "Leave")
* Set a password:
* Click your avitar (colorful box in the top right) for a dropdown box
* Click your avatar (colorful box in the top right) for a dropdown box
* Click "Settings" in the dropdown box
* Click on "Account" tab on the left
* **DO NOT USE YOUR SKC PASSWORD HERE!**
Expand All @@ -22,7 +22,7 @@
* Create new repo:
* Click the"+" in the upper right and select "+ New Repository"
* Repository Name: skc-your_name
* Make repository private (Visiblity): check the checkbox
* Make repository private (Visibility): check the checkbox
* Initialize Repository: check the checkbox
* Click "Create Repository"
* Navigate to your repo:
Expand All @@ -49,7 +49,7 @@
* Under "Workspace"
* Set "Restore .RData into workspace at startup" to "No"
* Set "Save workspace to .RData on exit" to "No"
* Set "Always save histroy" to "No"
* Set "Always save history" to "No"
* Click "Ok"
* Setup Git
* This needs to be done only once when you create a "new project".
Expand Down Expand Up @@ -111,7 +111,7 @@ git config --local --list
* Enter the username and password for the Git repo (not your account)
* Make sure there is not an error
* Verify push
* Click "Push" again and make sure it says "Everyting up-to-date"
* Click "Push" again and make sure it says "Everything up-to-date"
* Close git window
* Verify commit:
* Click "Commit" under the *Git menu*
Expand All @@ -122,14 +122,14 @@ git config --local --list
* Move Terminal and Console pane to the right
* "View" -> Panes -> Console on Right

## Quit Envrionment
## Quit Environment

* Git Commit: (see above)
* Shutdown RStudio: "File" -> "Quit Session"
* Shutdown Jupyter: "File" -> "Hub Control Panel" -> "Stop My Server"
* Close all Jupyter and RStudio windows

## Start Envrionment after Setup
## Start Environment after Setup

* Navigate to https://ci.skc.edu/ and click "Login to OSG Jupyter Notebook"
* Start Jupyter: Select "Data Science with RStudio" and click "Start"
Expand Down Expand Up @@ -194,6 +194,25 @@ git fetch
git status
```

### Git Workflow

* Fetch any changes from the remote repository (Gitea): `git fetch`
* Check the status of your repository: `git status`
* If there are changes from the remote repository:
* See what changed: `git log origin` and `git diff origin` (more detail)
* Merge the changes: `git merge`
* Do work and edit your files
* Find a logical spot to stop and commit (save)
* See what changed:
* `git status`
* `git diff`
* Stage files (index): `git add file.txt`
* Double check that nothing has been added to the remote repository: `git fetch`
* Check the status: `git status`
* Commit changes: `git commit` (write a good commit title and message!)
* Push the changes to the remote repository: `git push`
* Rest

### R Configuration

R packages must be installed every time the environment is started, to do this a `setup.R` script or a R Markdown document must be run with the following:
Expand Down
9 changes: 5 additions & 4 deletions ReadMe.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# SKC CI Workshop June 2024

*"If it's not Reproducible, it's Magic"*
*"Getting started with Cyberinfrastructure"*

## Lessons

Expand All @@ -18,8 +18,8 @@ Lessons (Day 2):

* Welcome and overview
* Sharing & collaborating with code (Github introduction)
* Introduction: https://happygitwithr.com/big-picture.html
* https://swcarpentry.github.io/git-novice/01-basics.html
* Motivation: https://happygitwithr.com/big-picture.html (extra background)
* https://swcarpentry.github.io/git-novice/04-changes.html
* https://swcarpentry.github.io/git-novice/05-history.html
* https://swcarpentry.github.io/git-novice/06-ignore.html
Expand All @@ -34,17 +34,18 @@ Lessons (Day 2):
* Login to the environment (SKC-CARE): https://ci.skc.edu/
* Instructor Notes: [Notes.md](Notes.md)
* Git and R (recommended for students and as a teaching resource): https://happygitwithr.com/
* Introduction: https://dx.doi.org/10.7287%2Fpeerj.preprints.3159v2
* R Markdown: https://bookdown.org/yihui/rmarkdown/markdown-syntax.html
* Git book: https://git-scm.com/book/en
* Git branching:
* Git branching:
* https://happygitwithr.com/git-branches (and remotes https://happygitwithr.com/git-remotes)
* https://nvie.com/posts/a-successful-git-branching-model/
* https://git-scm.com/book/en/v2/Git-Branching-Branches-in-a-Nutshell
* R Tutorial: https://www.cyclismo.org/tutorial/R/
* R project introduction http://cran.r-project.org/doc/manuals/R-intro.html
* R Language: https://www.r-project.org/
* Test Driven Development (TDD) http://www.agiledata.org/essays/tdd.html

### Advanced Materials

* Git internals: "Git for Ages 4 And Up" - https://youtu.be/1ffBJ4sVUb4
* Test Driven Development (TDD) http://www.agiledata.org/essays/tdd.html

0 comments on commit b15f66c

Please sign in to comment.