Skip to content

Commit

Permalink
differences for PR #2
Browse files Browse the repository at this point in the history
  • Loading branch information
actions-user committed Mar 28, 2024
1 parent d6fb268 commit 3ed94ef
Show file tree
Hide file tree
Showing 4 changed files with 126 additions and 1 deletion.
63 changes: 63 additions & 0 deletions 03-collaborative-git-centralized.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@

---
title: Collaborative Version Control - Centralized
teaching: 50
exercises: 60
---

:::::::::::::::::::::::::::::::::::::::: questions

- How can I use version control to collaborate with internal collaborators?

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


::::::::::::::::::::::::::::::::::::::: objectives

- Understand the basics of collaborative version control with git and Github
- Understand the centralized workflow

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

::: instructor
Teaching is done as a pair of instructors.
Instructor A acts as the owner of the repository, instructor B as a collaborator (internal or external).

First we show the centralized workflow all in the browser using Github:

* instructor A creates an issue (for example create ‘sum’ function)
* instructor B picks up the issue
* Instructor B creates a new branch (good to do this explicitly)
* Instructor B does some reviewable changes (a simple ‘sum’ function)
* Instructor B opens a new pull request.
* Instructor A reviews and approves the PR.
* Instructor B merges the pull request.
* Use Github repo’s insights -> network to visualize what just happened

:::

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

#### Exercise: Working as a project collaborator (in pairs):
- PERSON A: Create an issue in the repository
- PERSON B: Clone this repository to your system
- PERSON B: Create a new branch
- PERSON B: Make the changes requested in the issue
- PERSON B: Push the changes to the remote repository on GitHub
- PERSON B: Submit a Pull Request, refer to the issue (e.g. "Closes #1")
- PERSON A: Review the Pull Request
- PERSON B: Address the comments
- PERSON A: Approve the Pull Request
- PERSON B: Merge the Pull Request
::::::::::::::::::::::::::::::::::::::::::::::::::

::::::::::::::::::::::::::::::::::::::: solution

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


:::::::::::::::::::::::::::::::::::::::: keypoints
* Git and Github are superpowerful, not just for version control, but as tools for collaborative development
* Do code reviews and be constructive in them!
* Use centralized flow for internal collaborations
::::::::::::::::::::::::::::::::::::::::::::::::::
58 changes: 58 additions & 0 deletions 03-collaborative-git-distributed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@

---
title: Collaborative Version Control - Distributed
teaching: 10
exercises: 60
---

:::::::::::::::::::::::::::::::::::::::: questions

- How can I use version control to collaborate with external collaborators?

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


::::::::::::::::::::::::::::::::::::::: objectives

- Understand distributed workflow and when to use it

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

::: instructor
Teaching is done as a pair of instructors.
Instructor A acts as the owner of the repository, instructor B as a collaborator (internal or external).

Now we show distributed workflow. All in the browser using Github:

* Instructor A removes instructor B
* Instructor B now submits an issue
* Instructor A responds to issue asking instructor B to pick it up
* Instructor B forks repo, does some changes, and submits PR
* Instructor A reviews the changes
* Instructor B implements the changes
* Instructor A merges the pull request
* Use Github repo’s insights -> network to visualize what just happened
:::

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

### Exercise: Working as an external contributor (in pairs)

- PERSON A: Create an issue in Person B's repository
- PERSON A: Fork the repository to their own (= Person A's) account
- PERSON A: Clone the repository, make changes, push them back to the fork
- PERSON A: Submit a Pull Request from the fork to the original repository
- PERSON B: Make a change in the original repository in the same place as person A's proposed changes
- PERSON A: Solve the merge conflict in the Pull Request
- PERSON B: Review/Approve the Pull Request
- PERSON B: merge the Pull Request
::::::::::::::::::::::::::::::::::::::::::::::::::

::::::::::::::::::::::::::::::::::::::: solution

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


:::::::::::::::::::::::::::::::::::::::: keypoints
* Use distributed flow for external collaborations
::::::::::::::::::::::::::::::::::::::::::::::::::
2 changes: 2 additions & 0 deletions config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@ contact: 'training@esciencecenter.nl'
episodes:
- introduction.md
- 01-basics.md
- 03-collaborative-git-centralized.md
- 03-collaborative-git-distributed.md

# Information for Learners
learners:
Expand Down
4 changes: 3 additions & 1 deletion md5sum.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
"file" "checksum" "built" "date"
"CODE_OF_CONDUCT.md" "c93c83c630db2fe2462240bf72552548" "site/built/CODE_OF_CONDUCT.md" "2024-03-27"
"LICENSE.md" "b24ebbb41b14ca25cf6b8216dda83e5f" "site/built/LICENSE.md" "2024-03-27"
"config.yaml" "4da8d9004ef2ce12f1c90aeed7090d27" "site/built/config.yaml" "2024-03-27"
"config.yaml" "c40790a9155995acc0f772eb74dad3e2" "site/built/config.yaml" "2024-03-28"
"index.md" "a02c9c785ed98ddd84fe3d34ddb12fcd" "site/built/index.md" "2024-03-27"
"links.md" "8184cf4149eafbf03ce8da8ff0778c14" "site/built/links.md" "2024-03-27"
"episodes/introduction.md" "6370d5592eae179125841d442e98df54" "site/built/introduction.md" "2024-03-27"
"episodes/01-basics.md" "a13034f7710cef398adb66aa0b2cb3b6" "site/built/01-basics.md" "2024-03-27"
"episodes/03-collaborative-git-centralized.md" "156cf1fded0910da4ca2a5170897371e" "site/built/03-collaborative-git-centralized.md" "2024-03-28"
"episodes/03-collaborative-git-distributed.md" "2861ab29a93c8623c11ffabb37815f84" "site/built/03-collaborative-git-distributed.md" "2024-03-28"
"instructors/instructor-notes.md" "cae72b6712578d74a49fea7513099f8c" "site/built/instructor-notes.md" "2024-03-27"
"learners/reference.md" "1c7cc4e229304d9806a13f69ca1b8ba4" "site/built/reference.md" "2024-03-27"
"learners/setup.md" "5456593e4a75491955ac4a252c05fbc9" "site/built/setup.md" "2024-03-27"
Expand Down

0 comments on commit 3ed94ef

Please sign in to comment.