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

Commit

Permalink
Clarify setup.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
tmiddelkoop committed May 31, 2024
1 parent 2e73253 commit 1525b2f
Showing 1 changed file with 15 additions and 6 deletions.
21 changes: 15 additions & 6 deletions Notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -157,12 +157,12 @@ git config --local --list

## Technical Notes

RStudio keyboard shortcuts:
### RStudio keyboard shortcuts

* cmd-r/ctrl-r - Run a line and move to the next
* option-r/alt-r - Run a single line and stay on that line

Git Configuration:
### Git Configuration

For password based projects, configure username, email address, and enable password saving for your new project. Run in terminal once after the project has been created. Note the use of double quotes.

Expand All @@ -174,27 +174,32 @@ git config --local --list
```
*Please note we do not use `--global` since no global settings are saved in this Environment.

For personal access token projects, configure a persistent git configuration. Use this code in a `setup.sh` bash script or bash notebook and run once after staring a new environment. Note the use of double quotes.
For personal access token projects, configure a persistent git configuration. Use this code in a `setup.sh` bash script or bash notebook that you must run once after logging in and launching a new envrionment.
```bash
#!/bin/bash
ln -sfv ~/work/.gitconfig ~/
ln -sfv ~/work/.git-credentials ~/

git config --global credential.helper store
git config --global --list
```

You can also setup your `user.name` and `user.email` for every project (that is what `--global` does). This only needs to be once. Replace the name and email with your information and note the use of double quotes.

```bash
git config --global user.name "First Last"
git config --global user.email "first_last@skc.edu"
git config --global --list
```

Git Status:
### Git Status

Check the status of your project with the remote repository. In a terminal run:
```bash
git fetch
git status
```

R Configuration:
### 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 All @@ -204,3 +209,7 @@ install.packages(c("tidyverse", "lubridate", "ratdat"))
install.packages("ggplot2")
```

If you want to run this script from your setup.sh you can add code:
```bash
Rscript setup.R
```

0 comments on commit 1525b2f

Please sign in to comment.