generated from carpentries/workbench-template-rmd
-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d6fb268
commit 3ed94ef
Showing
4 changed files
with
126 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
:::::::::::::::::::::::::::::::::::::::::::::::::: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
:::::::::::::::::::::::::::::::::::::::::::::::::: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters