generated from carpentries/workbench-template-rmd
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added more lessons: git basic/advanced commands, gitlab, clean code
- Loading branch information
Bogdan Popescu
committed
Nov 19, 2024
1 parent
ccda737
commit d83fe94
Showing
7 changed files
with
1,913 additions
and
6 deletions.
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 |
---|---|---|
|
@@ -66,6 +66,9 @@ contact: '[email protected]' | |
# Order of episodes in your lesson | ||
episodes: | ||
- version_control.Rmd | ||
- basic-git-commands.Rmd | ||
- gitlab.Rmd | ||
- advanced-git-commands.Rmd | ||
- python-virtual-environmants.Rmd | ||
- qsmm.Rmd | ||
- clean-code.Rmd | ||
|
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,52 @@ | ||
--- | ||
title: 'Advanced Git Commands' | ||
--- | ||
|
||
:::::::::::::::::::::::::::::::::::::: questions | ||
|
||
- How can I use version control to collaborate with other people? | ||
- What do I do when my changes conflict with someone else's? | ||
|
||
:::::::::::::::::::::::::::::::::::::::::::::::: | ||
|
||
::::::::::::::::::::::::::::::::::::: objectives | ||
|
||
- Clone a remote repository. | ||
- Collaborate by pushing to a common repository. | ||
- Describe the basic collaborative workflow. | ||
- Explain what conflicts are and when they can occur. | ||
- Resolve conflicts resulting from a merge. | ||
|
||
:::::::::::::::::::::::::::::::::::::::::::::::: | ||
|
||
## Collaborating | ||
|
||
- Clone a remote repository setup in GitLab for this course | ||
- Make changes to a file, commit, and push back to GitLab | ||
- Introduce the basic collaborative workflow: | ||
- git pull | ||
- make changes | ||
- git add/commit | ||
- git push | ||
- Reviewing and commenting changes in GitLab | ||
|
||
## Solving Conflicts | ||
- Explain when and why conflicts occur | ||
- Explain how conflicts can be solved through a merge cycle | ||
- Techniques to minimize conflicts: | ||
- Pull from upstream more frequently, especially before starting new work | ||
- Make smaller more atomic commits | ||
- Where logically appropriate, break large files into smaller ones so that it is less likely that two authors will alter the same file simultaneously | ||
- Clarify who is responsible for what areas with your collaborators | ||
- Discuss what order tasks should be carried out in with your collaborators so that tasks expected to change the same lines won’t be worked on simultaneously | ||
|
||
|
||
|
||
::::::::::::::::::::::::::::::::::::: keypoints | ||
|
||
- `git clone` copies a remote repository to create a local repository with a remote called `origin` automatically set up. | ||
- Conflicts occur when two or more people change the same lines of the same file. | ||
- The version control system does not allow people to overwrite each other's changes blindly, but highlights conflicts so that they can be resolved. | ||
|
||
:::::::::::::::::::::::::::::::::::::::::::::::: | ||
|
Oops, something went wrong.