You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: _episodes/01-introduction.md
+16-24Lines changed: 16 additions & 24 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -26,37 +26,29 @@ While technology helps, it is not the solution on its own. We will also discuss
26
26
27
27
Before diving in, we should review some basic terminology and commands. Note that while other options are available, we are focusing on GitHub for this lesson.
28
28
29
-
-**repository**: The project, contains all data and history (commits, branches, tags).
30
-
-**remote (repository)**: The copy of the repository on a remote server, such as GitHub. Accessible to anyone who has access to the repository on the server. Also referred to as the "central" repository.
31
-
-**local (repository)**: A copy of the repository in another place, such as a laptop or your home directory on a cluster. Generally accessible to one person.
32
-
-**commit**: Snapshot of the project, gets a unique identifier (e.g. c7f0e8bfc718be04525847fc7ac237f470add76e).
33
-
-**branch**: Independent development line. The main development line is often called main or master.
34
-
-**tag**: A pointer to one commit, to be able to refer to it later. Like a commemorative plaque that you attach to a particular commit (e.g. phd-printed or paper-submitted).
35
-
-**cloning**: Copying the whole repository to your laptop - the first time. It is not necessary to download each file one by one. This creates a local copy of the repository.
36
-
-**forking**: Taking a copy of a repository (which is typically not yours) - your copy (fork) stays on GitHub/GitLab and you can make changes to your copy.
37
-
-**pull**: Bring changes from a remote repository to your local repository.
38
-
-**push**: Bring changes from your local repository to the remote repository.
-*repository (repo)*: The project, contains all data and history (commits, branches, tags).
30
+
-*remote (repository)*: The copy of the repository on a remote server, such as GitHub. Accessible to anyone who has access to the repository on the server. Also referred to as the "central" repository.
31
+
-*local (repository)*: A copy of the repository in another place, such as a laptop or your home directory on a cluster. Generally accessible to one person.
32
+
-*commit*: Snapshot of the project, gets a unique identifier (e.g. c7f0e8bfc718be04525847fc7ac237f470add76e).
33
+
-*branch*: Independent development line. The main development line is often called main or master.
34
+
-*tag*: A pointer to one commit, to be able to refer to it later. Like a commemorative plaque that you attach to a particular commit (e.g. phd-printed or paper-submitted).
35
+
-*clone*: Copying the whole repository to your laptop - the first time. This creates a local copy of the repository. "Clone" as a noun refers to the local copy of the repository.
36
+
-*fork*: Taking a copy of a repository (which is typically not yours) - your copy (fork) stays on GitHub/GitLab and you can make changes to your copy. "Fork" as a noun refers to the your forked copy of the repository.
37
+
-*pull*: Bring changes from a remote repository to your local repository.
38
+
-*push*: Bring changes from your local repository to the remote repository.
39
+
40
+
These definitions are adapted from [Code Refinery: Concepts around Collaboration](https://coderefinery.github.io/git-collaborative/concepts/).
41
41
42
42
A note about git integrations: You may find that your IDE has git built in allowing you to use the GUI instead of running the commands we talk about here. In this lesson we are focusing on the command line git commands, since they should be universal across any system you use. After this lesson we encourage you to use what you are most comfortable with, and the commands we cover will also help you better understand the functionality of your IDE git integration.
43
43
44
44
## Activity
45
45
46
46
Verify that you can access your GitHub account, have git installed on your computer, and can authenticate with GitHub from your computer, either using gh auth, ssh keys, or using your preferred GUI application.
47
47
48
-
In groups: have one person in your group create a repository from the provided template. Give access to the others in your group. Everyone should create a local clone with `git clone`. We will use this repository for the remainder of the exercises in this section.
48
+
Work in small groups of 3-4. Have one person in your group create a repository from the [provided template](https://github.com/INTERSECT-training/intersect-training-day2). To create a repository from the template click "Use this Template" in the top right, then "Create a New Repository". Give access to the others in your group. Everyone should accept the invitation to collaborate and then create a local clone with `git clone`. We will use this repository for the remainder of the exercises in this section.
49
49
50
-
## Outline
51
-
52
-
- Recall challenges:
53
-
- Sharing code in a cohesive way, everyone has access to the latest version, everyone is able to contribute equally
54
-
- Keeping organized when working on a team, staying on the same page, communicating
55
-
- Contributing document
56
-
- Brief review of terminology
57
-
58
-
## TODO
59
-
60
-
- Create/find repository template to use
50
+
## Additional Resources
51
+
-[Code Refinery: Concepts around Collaboration](https://coderefinery.github.io/git-collaborative/concepts/)
52
+
-[Code Refinery: Introduction to Version Control](https://coderefinery.github.io/git-intro/)
Copy file name to clipboardExpand all lines: _episodes/02-branches.md
+7-7Lines changed: 7 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -33,14 +33,14 @@ Changes made in one branch can be brought into another branch with a merge. For
33
33
34
34
You can create a branch on your local clone of the repository. If didn't just clone the repository it is always good to make sure you have any recent changes to the main branch by checking out the main branch and running "git pull":
35
35
36
-
```bash
36
+
```shell
37
37
git checkout main
38
38
git pull
39
39
```
40
40
41
41
Then, to create a branch we can run:
42
42
43
-
```bash
43
+
```shell
44
44
git checkout -b my_new_branch
45
45
```
46
46
@@ -54,7 +54,7 @@ This will create the branch `my_new_branch` and move you to the new branch. If y
54
54
55
55
The first time you push your branch to the remote repository, you will need to publish the branch by running run:
56
56
57
-
```bash
57
+
```shell
58
58
git push --set-upstream origin my_new_branch
59
59
```
60
60
@@ -64,7 +64,7 @@ After this any commits can be pushed with a simple `git push`.
64
64
65
65
If you need to switch to another existing branch you can use the `git checkout` command. For example, to switch back to the main branch you can run:
66
66
67
-
```bash
67
+
```shell
68
68
git checkout main
69
69
```
70
70
@@ -77,7 +77,7 @@ Remember, if you aren't sure which branch you are on you can run `git status`. I
77
77
78
78
Bring the changes from one branch into another branch by merging them. When you merge branches, changes from the specified branch are merged into the branch that you currently have checked out. For example,
79
79
80
-
```bash
80
+
```shell
81
81
git checkout my_new_branch
82
82
git merge main
83
83
```
@@ -89,7 +89,7 @@ will merge any changes introduced to `main` into the `my_new_branch`. Merging in
89
89
90
90
When development is complete on `my_new_branch`, it would be merged into `main`:
Copy file name to clipboardExpand all lines: _episodes/04-git-workflows.md
+5-3Lines changed: 5 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -68,14 +68,14 @@ In each of these example workflows we have assumed that anyone contributing to a
68
68
69
69
With a forking workflow it can be easy to end up with an old version of the code, especially if it changes frequently. It can get confusing whether we are attempting to pull from or push to the fork or the original repository. Setting up remotes with easy to remember aliases makes this much easier. A "remote" is a named connection to a remote repository. You can add and remove remotes with the `git remote add` and `git remote rm` commands, respectively. For example:
Here we are adding a remote called "upstream" for our central team repository and another called "my-fork" for our own fork. We can view our remotes with `git remote -v`. Now when you want to retrieve any changes from the upstream repository you can run `git fetch upstream`. To update your main branch with these changes, you would merge them into your local forked repository:
77
77
78
-
```bash
78
+
```shell
79
79
git checkout main # this is the main branch for your fork that you have cloned locally
80
80
git merge upstream/main
81
81
```
@@ -94,7 +94,9 @@ We will end with a quick note if your team works on shared systems, including cl
94
94
95
95
## Activity
96
96
97
-
We provide a base repository to each group that each group member creates a local copy of the repository (either by forking or cloning). Students should decide which workflow to use and set up their repository accordingly. Start a contributor guide that explains the layout and rules.
97
+
For your group's "project" that you have been working on through this lesson discuss which workflow would work best for your team. Set up the repository as needed to support this workflow. Start a contributor guide that explains the workflow and any rules for contributing.
98
+
99
+
If time allows, discuss any projects that your group members work on collaboratively with others. Is there a specified workflow for this project? How would someone contribute to the project?
Copy file name to clipboardExpand all lines: reference.md
+10-1Lines changed: 10 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,6 +4,15 @@ layout: reference
4
4
5
5
## Glossary
6
6
7
-
FIXME
7
+
-**repository**: The project, contains all data and history (commits, branches, tags).
8
+
-**remote (repository)**: The copy of the repository on a remote server, such as GitHub. Accessible to anyone who has access to the repository on the server. Also referred to as the "central" repository.
9
+
-**local (repository)**: A copy of the repository in another place, such as a laptop or your home directory on a cluster. Generally accessible to one person.
10
+
-**commit**: Snapshot of the project, gets a unique identifier (e.g. c7f0e8bfc718be04525847fc7ac237f470add76e).
11
+
-**branch**: Independent development line. The main development line is often called main or master.
12
+
-**tag**: A pointer to one commit, to be able to refer to it later. Like a commemorative plaque that you attach to a particular commit (e.g. phd-printed or paper-submitted).
13
+
-**cloning**: Copying the whole repository to your laptop - the first time. It is not necessary to download each file one by one. This creates a local copy of the repository.
14
+
-**forking**: Taking a copy of a repository (which is typically not yours) - your copy (fork) stays on GitHub/GitLab and you can make changes to your copy.
15
+
-**pull**: Bring changes from a remote repository to your local repository.
16
+
-**push**: Bring changes from your local repository to the remote repository.
0 commit comments