Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add branching episode #58

Merged
merged 9 commits into from
Mar 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 15 additions & 2 deletions episodes/07-github.md
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@
our local repository to the repository on GitHub:

```bash
$ git push
$ git push origin main
```

Since Dracula set up a passphrase, it will prompt him for it. If you completed advanced settings for your authentication, it
Expand Down Expand Up @@ -355,7 +355,7 @@

4. Push that change to the remote repository.

::::::::::::::::: solutions

Check warning on line 358 in episodes/07-github.md

View workflow job for this annotation

GitHub Actions / Build markdown source files if valid

[unknown div] solutions

First, if you are in Rstudio, close your R Project from `File` > `Close Project`.

Expand Down Expand Up @@ -397,7 +397,7 @@
We can pull changes from the remote repository to the local one as well:

```bash
$ git pull
$ git pull origin main
```

```output
Expand Down Expand Up @@ -459,11 +459,24 @@
$ git pull
```

If you are interested on how to write good READMEs, we invite you to review a dedicated episode in the [Improve your code for Epidemic Analysis with R](https://epiverse-trace.github.io/research-compendium/) tutorial website!

:::::::::::::::::::::::::

::::::::::::::::::::::::::::::::::::::::::::::::::

::::::::::::::::::::::::: testimonial

### Share your online repository!

This tutorial have a **Discussions** board also hosted in GitHub.

1. Access to this [Welcome entry](https://github.com/epiverse-trace/git-rstudio-basics/discussions/10)

2. Share with us a link to the `case` repository you just uploaded! (For example, this is the link to the repository of one of our participants <https://github.com/avallecam/cases>)

:::::::::::::::::::::::::

::::::::::::::::: checklist

![Use `git pull` to download content from a remote repository to the workspace and update the local repository to match that content. Use `git push` to upload local repository content to a remote repository.](fig/cut-git-verb_map-09.png)
Expand Down
37 changes: 23 additions & 14 deletions episodes/08-collab.md
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ Take a look at the Owner's repository on GitHub again, and you should be
able to see the new commit made by the Collaborator. You may need to refresh
your browser to see the new commit.

::::::::::::::::::::::::::::::::::::::::: callout
::::::::::::::::::::::::::::::::::::::::: spoiler

## Some more about remotes

Expand Down Expand Up @@ -267,14 +267,6 @@ read and review.

::::::::::::::::::::::::::::::::::::::::::::::::::

::::::::::::::::::::::::::::::::::::::: challenge

## Switch Roles and Repeat

Switch roles and repeat the whole process.


::::::::::::::::::::::::::::::::::::::::::::::::::

::::::::::::::::::::::::::::::::::::::: challenge

Expand All @@ -288,20 +280,37 @@ command line? And on GitHub?

## Solution

On the command line, the Collaborator can use `git fetch origin main`
**On GitHub**, the Collaborator can go to the repository and click on
"commits" to view the most recent commits pushed to the repository.

![Click on "commit". Select one commit.](fig/github-commits-button.png)

![Replace age with sex commit. The removed content within lines is in red. The added content within lines is in green.](fig/github-commit-diff.png)

On the **command line**, the Collaborator can use `git fetch origin main`
to get the remote changes into the local repository, but without merging
them. Then by running `git diff main origin/main` the Collaborator
will see the changes output in the terminal.

On GitHub, the Collaborator can go to the repository and click on
"commits" to view the most recent commits pushed to the repository.

![Use `git fetch` to download the remote content but not update your local repo's working state, leaving your current work intact. Use `git pull` to download the remote content for the active local branch and immediately merge it. this can potentially cause conflicts.](fig/cut-git-verb_map-12.png)

:::::::::::::::::::::::::

::::::::::::::::::::::::::::::::::::::::::::::::::

## Group challenge

::::::::::::::::::::::::::::::::::::::: challenge

## Switch Roles and Repeat

Switch roles and repeat the whole process.


::::::::::::::::::::::::::::::::::::::::::::::::::

## Individual challenges

::::::::::::::::::::::::::::::::::::::: challenge

## Comment Changes in GitHub
Expand Down Expand Up @@ -332,7 +341,7 @@ What are some of the benefits of using version control, Git and GitHub?

### Create your GitHub profile!

Your profile page introduce you to other contributors on GitHub:
Now your work will be visible online on GitHub. Your profile page introduce you to other contributors on GitHub:

![](fig/github-create-00.png)

Expand Down
Loading
Loading