Skip to content

Commit

Permalink
More edits to contribute
Browse files Browse the repository at this point in the history
  • Loading branch information
fontikar committed May 21, 2024
1 parent 4420521 commit ead52be
Show file tree
Hide file tree
Showing 3 changed files with 330 additions and 14 deletions.
46 changes: 32 additions & 14 deletions book/contributing.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,16 @@ This resource is created in mind so that the community that uses it, can also co

Importantly, **all skill levels** are welcome to contribute, even if you think your skills are not up to scratch - this is what this guide is for!

### Hello Quarto!

This book is built by [Quarto](https://quarto.org/) which is an open source, cross-language publishing system that allows users to build beautiful things from blogs, to websites and books!

You can learn more about the capabilities of Quarto in [this talk](https://www.youtube.com/watch?v=p7Hxu4coDl8) by Mine Çetinkaya-Rundel & Julia Stewart Lowndes at posit::conf(2023)

#### Install Quarto

Let's first make sure we the latest version of [Quarto](https://quarto.org/docs/get-started/) installed.

### GitHub Workflow

Let’s talk about the Git/GitHub part of the workflow. Git is a **version control** system. It that **tracks changes in our code** that generated this book and helps us **coordinate our collaborative edits**.
Expand Down Expand Up @@ -34,7 +44,7 @@ There are many [git clients to choose from](https://git-scm.com/downloads/guis).
If you are an RStudio user, there is a [git tab that is built-in](https://jennybc.github.io/2014-05-12-ubc/ubc-r/session03_git.html#configurerstudio) to the interface, its features are more simplified than the previously mentioned clients but does the basic commands that we will talk about next.

::: {.callout-note}
For the rest of the chapter, we will focus on using Github Desktop, but the main git commands should translate to whichever client you are using.
For the rest of the chapter, we will focus on using Github Desktop, but the main git commands should translate to whichever client you are using.
:::

#### Cloning: make a local copy
Expand All @@ -49,47 +59,55 @@ Head over to the [remote repo for the book](https://github.com/unsw-edu-au/r4psy

![](images/remote_repo.png)

Here you will find a dropdown menu on how to clone the code from the remote repo.
Here you will find a drop-down menu showing different methods of cloning the code from the remote repo.

We will **stick with the default option of using HTTPS** a.k.a. cloning by using the URL of the remote repo.

3. Click on the copy URL button (The stacked squares icon)

4. Navigate to Github Desktop and click on the first drop down menu from the left. Here you will find the **Add** button.

![](images/add_repo.png)

5. Click on **Add** and then **Clone Repository**

#### Stage and add: Track your files

6. Click on the **URL** option and paste in the URL of this book's remote repo e.g. **https://github.com/unsw-edu-au/r4psych**

7. Under **Local Path**, you can choose where you want to place this cloned repo. Avoid putting your repos in Cloud services such as Dropbox or Google Drive. These can sometimes interfere with git's ability to track your changes.

8. Finally, click **Clone** and let git do the work! It will copy everything that is in the remote repo and bring it down locally on your computer!

9. Navigate to the local path where you told git to clone to in Step 7 and check out the directories. You will learn more about these in [Book Structure](#sec-bookstructure)

#### Branches

We will work in branches so as to not overwrite each other’s work, and let GitHub do what it does best.
We will work in branches so as to not overwrite each other’s work and have a systematic way in introducing new contributions to the book. Coordinating collaboratives changes on branches is what GitHub does best.

The main branch will be the current approved version of the book. The main branch is what displays at https://nasa-openscapes.github.io/earthdata-cloud-cookbook.
The `main` branch will be the current approved version of the book. The `main` branch is what displays at https://unsw-edu-au.github.io/r4psych/

A nice clean workflow with branches is to consider them temporary. You pull the most recent from main, you create a branch locally, you make your edits, you commit regularly, you push regularly to github.com, and then you create a pull request for it to be merged into main, and when it’s approved the branch is deleted on github.com and you also delete it locally. That’s the workflow we’ll walk through here. A great resource on GitHub setup and collaboration is Happy Git with R, which includes fantastic background philosophy as well as bash commands for setup, workflows, and collaboration.
A nice clean workflow with branches is to consider them temporary. You pull the most recent from `main`, you **create a branch locally**, you make your edits, you commit regularly, you push regularly to github.com, and then you create a pull request for it to be merged into main, and when it’s approved the branch is deleted on github.com and you also delete it locally. That’s the workflow we’ll walk through here. A great resource on GitHub setup and collaboration is Happy Git with R, which includes fantastic background philosophy as well as bash commands for setup, workflows, and collaboration.

The following assumes you’ve completed the initial setup from the previous chapter.

#### Fetch the latest version

#### Stage and add your changes

### Hello Quarto!
#### Push your work to remote

This book is built by [Quarto](https://quarto.org/) which is an open source, cross-language publishing system that allows users to build beautiful things from blogs, to websites and books!

You can learn more about the capabilities of Quarto in [this talk](https://www.youtube.com/watch?v=p7Hxu4coDl8) by Mine Çetinkaya-Rundel & Julia Stewart Lowndes at posit::conf(2023)

#### Install Quarto

Let's first make sure we the latest version of [Quarto](https://quarto.org/docs/get-started/) installed.

### Quarto Workflow



## Book Structure



### Quarto Workflow

## Book Structure {#sec-bookstructure}

## Book Practices and Conventions

Expand Down
Binary file added book/images/add_repo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit ead52be

Please sign in to comment.