Skip to content
This repository has been archived by the owner on Feb 24, 2024. It is now read-only.

New Crowdin updates #5

Open
wants to merge 171 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
171 commits
Select commit Hold shift + click to select a range
de4a2f7
New translations 01-basics.md (Spanish)
joelnitta Jan 13, 2024
f855705
New translations 01-basics.md (Japanese)
joelnitta Jan 13, 2024
b2b65f5
New translations 02-setup.md (Spanish)
joelnitta Jan 13, 2024
031c32e
New translations 02-setup.md (Japanese)
joelnitta Jan 13, 2024
430ce3c
New translations 03-create.md (Spanish)
joelnitta Jan 13, 2024
38a0bc0
New translations 03-create.md (Japanese)
joelnitta Jan 13, 2024
0cce032
New translations 04-changes.md (Spanish)
joelnitta Jan 13, 2024
e4e01ca
New translations 04-changes.md (Japanese)
joelnitta Jan 13, 2024
b365b50
New translations 05-history.md (Spanish)
joelnitta Jan 13, 2024
d4fb9b8
New translations 05-history.md (Japanese)
joelnitta Jan 13, 2024
4c25fbf
New translations 06-ignore.md (Spanish)
joelnitta Jan 13, 2024
e0e6049
New translations 06-ignore.md (Japanese)
joelnitta Jan 13, 2024
1f9184d
New translations 07-github.md (Spanish)
joelnitta Jan 13, 2024
2c2e055
New translations 07-github.md (Japanese)
joelnitta Jan 13, 2024
16b8fdd
New translations 08-collab.md (Spanish)
joelnitta Jan 13, 2024
636bb05
New translations 08-collab.md (Japanese)
joelnitta Jan 13, 2024
3d07656
New translations 09-conflict.md (Spanish)
joelnitta Jan 13, 2024
dc2e796
New translations 09-conflict.md (Japanese)
joelnitta Jan 13, 2024
04c790b
New translations 10-open.md (Spanish)
joelnitta Jan 13, 2024
9cedfe7
New translations 10-open.md (Japanese)
joelnitta Jan 13, 2024
651a8b6
New translations 11-licensing.md (Spanish)
joelnitta Jan 13, 2024
249a8d4
New translations 11-licensing.md (Japanese)
joelnitta Jan 13, 2024
987f8bb
New translations 12-citation.md (Spanish)
joelnitta Jan 13, 2024
23a40a8
New translations 12-citation.md (Japanese)
joelnitta Jan 13, 2024
0bfcd10
New translations 13-hosting.md (Spanish)
joelnitta Jan 13, 2024
e61e78b
New translations 13-hosting.md (Japanese)
joelnitta Jan 13, 2024
e73b07a
New translations 14-supplemental-rstudio.md (Spanish)
joelnitta Jan 13, 2024
fe97805
New translations 14-supplemental-rstudio.md (Japanese)
joelnitta Jan 13, 2024
04e1709
New translations instructor-notes.md (Spanish)
joelnitta Jan 13, 2024
f6ad735
New translations instructor-notes.md (Japanese)
joelnitta Jan 13, 2024
d1e4bc2
New translations discuss.md (Spanish)
joelnitta Jan 13, 2024
9309a7f
New translations discuss.md (Japanese)
joelnitta Jan 13, 2024
dc0843d
New translations reference.md (Spanish)
joelnitta Jan 13, 2024
6a79a0e
New translations reference.md (Japanese)
joelnitta Jan 13, 2024
3ad70da
New translations setup.md (Spanish)
joelnitta Jan 13, 2024
baf1eaf
New translations setup.md (Japanese)
joelnitta Jan 13, 2024
cda2e15
New translations learner-profiles.md (Spanish)
joelnitta Jan 13, 2024
8497013
New translations learner-profiles.md (Japanese)
joelnitta Jan 13, 2024
75cfb8b
New translations code_of_conduct.md (Spanish)
joelnitta Jan 13, 2024
3c1bef7
New translations code_of_conduct.md (Japanese)
joelnitta Jan 13, 2024
86994d1
New translations config.yaml (Spanish)
joelnitta Jan 13, 2024
d6e4a71
New translations config.yaml (Japanese)
joelnitta Jan 13, 2024
fa0d902
New translations contributing.md (Spanish)
joelnitta Jan 13, 2024
309e1e2
New translations contributing.md (Japanese)
joelnitta Jan 13, 2024
22d3f80
New translations license.md (Spanish)
joelnitta Jan 13, 2024
b39d07c
New translations license.md (Japanese)
joelnitta Jan 13, 2024
b0402d4
New translations readme.md (Spanish)
joelnitta Jan 13, 2024
9e63fa8
New translations readme.md (Japanese)
joelnitta Jan 13, 2024
58566d1
New translations index.md (Spanish)
joelnitta Jan 13, 2024
1541610
New translations index.md (Japanese)
joelnitta Jan 13, 2024
adf4299
New translations 01-basics.md (Portuguese)
joelnitta Jan 13, 2024
d649923
New translations 02-setup.md (Portuguese)
joelnitta Jan 13, 2024
ace2cfe
New translations 03-create.md (Portuguese)
joelnitta Jan 13, 2024
43dd4f9
New translations 04-changes.md (Portuguese)
joelnitta Jan 13, 2024
11ac175
New translations 05-history.md (Portuguese)
joelnitta Jan 13, 2024
9b5ffd1
New translations 06-ignore.md (Portuguese)
joelnitta Jan 13, 2024
6a7506f
New translations 07-github.md (Portuguese)
joelnitta Jan 13, 2024
7ef2967
New translations 08-collab.md (Portuguese)
joelnitta Jan 13, 2024
849d881
New translations 09-conflict.md (Portuguese)
joelnitta Jan 13, 2024
5561795
New translations 10-open.md (Portuguese)
joelnitta Jan 13, 2024
72bfa71
New translations 11-licensing.md (Portuguese)
joelnitta Jan 13, 2024
410e8c2
New translations 12-citation.md (Portuguese)
joelnitta Jan 13, 2024
181c565
New translations 13-hosting.md (Portuguese)
joelnitta Jan 13, 2024
1270681
New translations 14-supplemental-rstudio.md (Portuguese)
joelnitta Jan 13, 2024
66a2dfa
New translations instructor-notes.md (Portuguese)
joelnitta Jan 13, 2024
2290dd3
New translations discuss.md (Portuguese)
joelnitta Jan 13, 2024
fe06dc9
New translations reference.md (Portuguese)
joelnitta Jan 13, 2024
97c34e6
New translations setup.md (Portuguese)
joelnitta Jan 13, 2024
ac87ce1
New translations learner-profiles.md (Portuguese)
joelnitta Jan 13, 2024
66376b0
New translations code_of_conduct.md (Portuguese)
joelnitta Jan 13, 2024
63c3537
New translations config.yaml (Portuguese)
joelnitta Jan 13, 2024
38e815c
New translations contributing.md (Portuguese)
joelnitta Jan 13, 2024
1b4e0bc
New translations license.md (Portuguese)
joelnitta Jan 13, 2024
733443a
New translations readme.md (Portuguese)
joelnitta Jan 13, 2024
1a2f97e
New translations index.md (Portuguese)
joelnitta Jan 13, 2024
35bebc9
New translations 01-basics.md (Ukrainian)
joelnitta Jan 13, 2024
601d296
New translations 02-setup.md (Ukrainian)
joelnitta Jan 13, 2024
ca6538e
New translations 03-create.md (Ukrainian)
joelnitta Jan 13, 2024
3e5f794
New translations 04-changes.md (Ukrainian)
joelnitta Jan 13, 2024
8e834a9
New translations 05-history.md (Ukrainian)
joelnitta Jan 13, 2024
9b32a3b
New translations 06-ignore.md (Ukrainian)
joelnitta Jan 13, 2024
ec28f67
New translations 07-github.md (Ukrainian)
joelnitta Jan 13, 2024
87ff7fe
New translations 08-collab.md (Ukrainian)
joelnitta Jan 13, 2024
48d090d
New translations 09-conflict.md (Ukrainian)
joelnitta Jan 13, 2024
054e607
New translations 10-open.md (Ukrainian)
joelnitta Jan 13, 2024
17e2fea
New translations 11-licensing.md (Ukrainian)
joelnitta Jan 13, 2024
303bcba
New translations 12-citation.md (Ukrainian)
joelnitta Jan 13, 2024
e30485f
New translations 13-hosting.md (Ukrainian)
joelnitta Jan 13, 2024
cc2143a
New translations 14-supplemental-rstudio.md (Ukrainian)
joelnitta Jan 13, 2024
93ca281
New translations instructor-notes.md (Ukrainian)
joelnitta Jan 13, 2024
caab507
New translations discuss.md (Ukrainian)
joelnitta Jan 13, 2024
b9e9ef1
New translations reference.md (Ukrainian)
joelnitta Jan 13, 2024
3d514c5
New translations setup.md (Ukrainian)
joelnitta Jan 13, 2024
415df42
New translations learner-profiles.md (Ukrainian)
joelnitta Jan 13, 2024
4d9db12
New translations code_of_conduct.md (Ukrainian)
joelnitta Jan 13, 2024
2f8190e
New translations config.yaml (Ukrainian)
joelnitta Jan 13, 2024
22f8372
New translations contributing.md (Ukrainian)
joelnitta Jan 13, 2024
0621ef9
New translations license.md (Ukrainian)
joelnitta Jan 13, 2024
398d002
New translations readme.md (Ukrainian)
joelnitta Jan 13, 2024
e698dd9
New translations index.md (Ukrainian)
joelnitta Jan 13, 2024
c99593e
New translations index.md (Ukrainian)
joelnitta Jan 13, 2024
6d4f2d1
New translations 04-changes.md (Ukrainian)
joelnitta Jan 13, 2024
a236ea9
New translations 05-history.md (Ukrainian)
joelnitta Jan 13, 2024
de7032d
New translations index.md (Ukrainian)
joelnitta Jan 13, 2024
f28b017
New translations 06-ignore.md (Ukrainian)
joelnitta Jan 13, 2024
031cac2
New translations 07-github.md (Ukrainian)
joelnitta Jan 13, 2024
8342ee0
New translations setup.md (Ukrainian)
joelnitta Jan 13, 2024
f4374df
New translations 08-collab.md (Ukrainian)
joelnitta Jan 13, 2024
194a512
New translations 09-conflict.md (Ukrainian)
joelnitta Jan 13, 2024
991a92a
New translations 10-open.md (Ukrainian)
joelnitta Jan 13, 2024
79084da
New translations 11-licensing.md (Ukrainian)
joelnitta Jan 13, 2024
341cccd
New translations 12-citation.md (Ukrainian)
joelnitta Jan 13, 2024
5c08ed5
New translations 13-hosting.md (Ukrainian)
joelnitta Jan 13, 2024
a3197ca
New translations 14-supplemental-rstudio.md (Ukrainian)
joelnitta Jan 13, 2024
c905e8a
New translations index.md (Ukrainian)
joelnitta Jan 13, 2024
a8cad67
New translations 07-github.md (Ukrainian)
joelnitta Jan 13, 2024
b630b9c
New translations index.md (Ukrainian)
joelnitta Jan 13, 2024
f862b51
New translations 07-github.md (Ukrainian)
joelnitta Jan 13, 2024
3a1369c
New translations 01-basics.md (Ukrainian)
joelnitta Jan 14, 2024
48dfa76
New translations 02-setup.md (Ukrainian)
joelnitta Jan 14, 2024
d78681a
New translations 03-create.md (Ukrainian)
joelnitta Jan 14, 2024
619e782
New translations 04-changes.md (Ukrainian)
joelnitta Jan 14, 2024
cd587ce
New translations 05-history.md (Ukrainian)
joelnitta Jan 14, 2024
ee9a362
New translations 06-ignore.md (Ukrainian)
joelnitta Jan 14, 2024
cbf9b1c
New translations 07-github.md (Ukrainian)
joelnitta Jan 14, 2024
82b7696
New translations index.md (Ukrainian)
joelnitta Jan 14, 2024
1b07112
New translations 07-github.md (Ukrainian)
joelnitta Jan 14, 2024
40ac06a
New translations 07-github.md (Ukrainian)
joelnitta Jan 14, 2024
55eee73
New translations 08-collab.md (Ukrainian)
joelnitta Jan 14, 2024
c690c86
New translations setup.md (Ukrainian)
joelnitta Jan 14, 2024
31f3bb2
New translations config.yaml (Ukrainian)
joelnitta Jan 14, 2024
1a4e277
New translations 08-collab.md (Ukrainian)
joelnitta Jan 14, 2024
8a4f709
New translations 09-conflict.md (Ukrainian)
joelnitta Jan 14, 2024
7c562c1
New translations 09-conflict.md (Ukrainian)
joelnitta Jan 14, 2024
da52fb6
New translations 07-github.md (Ukrainian)
joelnitta Jan 14, 2024
037d743
New translations 08-collab.md (Ukrainian)
joelnitta Jan 14, 2024
dc791af
New translations 09-conflict.md (Ukrainian)
joelnitta Jan 14, 2024
d4a98a7
New translations 09-conflict.md (Ukrainian)
joelnitta Jan 14, 2024
7edfd01
New translations 01-basics.md (Ukrainian)
joelnitta Jan 14, 2024
061b8d2
New translations 02-setup.md (Ukrainian)
joelnitta Jan 14, 2024
344984d
New translations 04-changes.md (Ukrainian)
joelnitta Jan 14, 2024
b188a9d
New translations 05-history.md (Ukrainian)
joelnitta Jan 14, 2024
2a828b3
New translations 09-conflict.md (Ukrainian)
joelnitta Jan 14, 2024
830e78b
New translations config.yaml (Ukrainian)
joelnitta Jan 14, 2024
38eb520
New translations 10-open.md (Ukrainian)
joelnitta Jan 15, 2024
77673dd
New translations 11-licensing.md (Ukrainian)
joelnitta Jan 25, 2024
e36bb90
New translations learner-profiles.md (Ukrainian)
joelnitta Jan 29, 2024
8ecf221
New translations code_of_conduct.md (Ukrainian)
joelnitta Jan 29, 2024
1f2dc1f
New translations readme.md (Ukrainian)
joelnitta Jan 29, 2024
6f5e2a9
New translations 10-open.md (Ukrainian)
joelnitta Jan 30, 2024
e76128d
New translations 11-licensing.md (Ukrainian)
joelnitta Feb 4, 2024
c1ade40
New translations 12-citation.md (Ukrainian)
joelnitta Feb 4, 2024
5419b72
New translations 13-hosting.md (Ukrainian)
joelnitta Feb 4, 2024
0abfc99
New translations 14-supplemental-rstudio.md (Ukrainian)
joelnitta Feb 4, 2024
7e8fcd2
New translations reference.md (Ukrainian)
joelnitta Feb 4, 2024
efe6fb5
New translations learner-profiles.md (Ukrainian)
joelnitta Feb 4, 2024
eab9aaf
New translations 11-licensing.md (Ukrainian)
joelnitta Feb 4, 2024
5127a80
New translations reference.md (Ukrainian)
joelnitta Feb 4, 2024
531eb1b
New translations 12-citation.md (Ukrainian)
joelnitta Feb 5, 2024
dcb0430
New translations 13-hosting.md (Ukrainian)
joelnitta Feb 5, 2024
99fccdd
New translations 13-hosting.md (Ukrainian)
joelnitta Feb 9, 2024
62bae69
New translations 13-hosting.md (Ukrainian)
joelnitta Feb 9, 2024
fc068ef
New translations 14-supplemental-rstudio.md (Ukrainian)
joelnitta Feb 16, 2024
be6c1a1
New translations 14-supplemental-rstudio.md (Ukrainian)
joelnitta Feb 16, 2024
1a79fd7
New translations 14-supplemental-rstudio.md (Ukrainian)
joelnitta Feb 16, 2024
83a9417
New translations 06-ignore.md (Japanese)
joelnitta Feb 18, 2024
59b63b0
New translations 06-ignore.md (Japanese)
joelnitta Feb 23, 2024
17522af
New translations 07-github.md (Japanese)
joelnitta Feb 23, 2024
20c3808
New translations 08-collab.md (Japanese)
joelnitta Feb 23, 2024
fc037b5
New translations discuss.md (Japanese)
joelnitta Feb 23, 2024
e0e59db
New translations 13-hosting.md (Japanese)
joelnitta Feb 23, 2024
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
Prev Previous commit
Next Next commit
New translations instructor-notes.md (Japanese)
  • Loading branch information
joelnitta committed Jan 13, 2024
commit f6ad735aceeab541e27d8fa57bb53dc97f026825
327 changes: 327 additions & 0 deletions locale/ja/instructors/instructor-notes.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,327 @@
---
title: Instructor Notes
---

Using a software tool to handle the versions of your project files
lets you focus on the more interesting/innovative aspects of your project.

- Version control's advantages
- It's easy to set up
- Every copy of a Git repository is a full backup of a project and its history
- A few easy-to-remember commands are all you need for most day-to-day version control tasks
- The [GitHub][github] hosting service provides a web-based collaboration service
- Two main concepts
- _commit_: a recorded set of changes in your project's files
- _repository_: the history of all your project's commits
- Why use GitHub?
- No need for a server: easy to set up
- GitHub's strong community: your colleagues are probably already there

## Overall

Version control might be the most important topic we teach, but Git is
definitely the most complicated tool. However, GitHub presently dominates the
open software repository landscape, so the time and effort required to teach
fundamental Git is justified and worthwhile.

Because of this complexity, we don't teach novice learners about many
interesting topics, such as branching, hashes, and commit objects.

Instead we try to convince them that version control is useful for researchers
working in teams or not, because it is

- a better way to "undo" changes,
- a better way to collaborate than mailing files back and forth, and
- a better way to share your code and other scientific work with the world.

## Teaching Notes

- You can "split" your shell so that recent commands remain in view using [this](https://github.com/rgaiacs/swc-shell-split-window) script.

- Make sure the network is working _before_ starting this lesson.

- Drawings are particularly useful in this lesson: if you have a whiteboard,
[use it][drawings]!

- Version control is usually not the first subject in a workshop,
so get learners to create a GitHub account after the session before.
Remind learners that the username and email they use for GitHub (and setup
during Git configuration) will be viewable to the public by default.
However, there are many reasons why a learner may not want their personal
information viewable, and GitHub has [resources for keeping an email address
private][github-privacy].

- If some learners are using Windows, there will inevitably be issues
merging files with different line endings. (Even if everyone's on
some flavor of Unix, different editors may or may not add a
newline to the last line of a file.) Take a moment to explain
these issues, since learners will almost certainly trip over them
again. If learners are running into line ending problems, GitHub
has a [page][github-line-endings] that helps with troubleshooting.
Specifically, the [section on refreshing a repository][github-line-endings-refresh]
may be helpful if learners need to change the `core.autocrlf` setting
after already having made one or more commits.

- We don't use a Git GUI in these notes because we haven't found one that
installs easily and runs reliably on the three major operating systems, and
because we want learners to understand what commands are being run. That
said, instructors should demo a GUI on their desktop at some point during
this lesson and point learners at [this page][github-gui].

- Instructors should show learners graphical diff/merge tools like
[DiffMerge][diffmerge].

- When appropriate, explain that we teach Git rather than CVS, Subversion, or
Mercurial primarily because of GitHub's growing popularity: CVS and
Subversion are now seen as legacy systems, and Mercurial isn't nearly as
widely used in the sciences right now.

- Further resources:

- [git-it] is a self-paced command-line Git demo,
with [git-it-electron] its GitHub Desktop successor.
- [Code School][code-school] has a free interactive course, [Try Git][try-git].
- for instructors, [the Git parable][git-parable] is useful background reading

## [Automated Version Control](../episodes/01-basics.md)

- Ask, "Who uses 'undo' in their editor?" All say "Me". 'Undo' is the simplest
form of version control.

- Give learners a five-minute overview of what version control does for them
before diving into the watch-and-do practicals. Most of them will have
tried to co-author papers by emailing files back and forth, or will have
biked into the office only to realize that the USB key with last night's
work is still on the kitchen table. Instructors can also make jokes about
directories with names like "final version", "final version revised",
"final version with reviewer three's corrections", "really final version",
and, "come on this really has to be the last version" to motivate version
control as a better way to collaborate and as a better way to back work up.

## [Setting Up Git](../episodes/02-setup.md)

- We suggest instructors and students use `nano` as the text editor for this
lessons because

- it runs in all three major operating systems,
- it runs inside the shell (switching windows can be confusing to students), and
- it has shortcut help at the bottom of the window.

Please point out to students during setup that they can and should use
another text editor if they're already familiar with it.

- When setting up Git, be very clear what learners have to enter: it is
common for them to edit the instructor's details (e.g. email). Check at
the end using `git config --list`.

- When setting up the default branch name, if learners have a Git version
older than 2.28, the default branch name can be changed for the lesson
using `git branch -M main` if there are currently commits in the repository,
or `git checkout -b main` if there are no commits/the repository is completely empty.

## [Creating a Repository](../episodes/03-create.md)

- When you do `git status`, Mac users may see a `.DS_Store` file showing as
untracked. This a file that Mac OS creates in each directory.

- The challenge "Places to create repositories" tries to reinforce the idea
that the `.git` folder contains the whole Git repo and deleting this folder
undoes a `git init`. It also gives the learner the way to fix the common
mistake of putting unwanted folders (like `Desktop`) under version control.

Instead of removing the `.git` folder directly, you can choose to move it
first to a safer directory and remove it from there:

```bash
$ mv .git temp_git
$ rm -rf temp_git
```

The challenge suggests that it is a bad idea to create a Git repo inside another repo.
For more discussion on this topic, please see [this issue][repos-in-repos].

## [Tracking Changes](../episodes/04-changes.md)

- It's important that learners do a full commit cycle by themselves (make
changes, `git diff`, `git add`, and `git commit`). The "`bio` repository"
challenge does that.

- This is a good moment to show a diff with a graphical diff tool. If you
skip it because you're short on time, show it once in GitHub.

- One thing may cause confusion is recovering old versions. If, instead of
doing `$ git checkout f22b25e mars.txt`, someone does `$ git checkout f22b25e`, they wind up in the "detached HEAD" state and confusion abounds.
It's then possible to keep on committing, but things like `git push origin main` a bit later will not give easily comprehensible results. It also
makes it look like commits can be lost. To "re-attach" HEAD, use
`git checkout main`.

- This is a good moment to show a log within a Git GUI. If you skip it
because you're short on time, show it once in GitHub.

## [Ignoring Things](../episodes/06-ignore.md)

Just remember that you can use wildcards and regular expressions to ignore a
particular set of files in `.gitignore`.

## [Remotes in GitHub](../episodes/07-github.md)

- Make it clear that Git and GitHub are not the same thing: Git is an open
source version control tool, GitHub is a company that hosts Git
repositories in the web and provides a web interface to interact with repos
they host.

- It is very useful to draw a diagram showing the different repositories
involved.

- When pushing to a remote, the output from Git can vary slightly depending on
what leaners execute. The lesson displays the output from git if a learner
executes `git push origin main`. However, some learners might use syntax
suggested by GitHub for pushing to a remote with an existing repository,
which is `git push -u origin main`. Learners using syntax from GitHub,
`git push -u origin main`, will have slightly different output, including
the line `Branch main set up to track remote branch main from origin by rebasing.`

## [Collaborating](../episodes/08-collab.md)

- Decide in advance whether all the learners will work in one shared
repository, or whether they will work in pairs (or other small groups) in
separate repositories. The former is easier to set up; the latter runs
more smoothly.

- Role playing between two instructors can be effective when teaching the
collaboration and conflict sections of the lesson. One instructor can play
the role of the repository owner, while the second instructor can play the
role of the collaborator. If it is possible, try to use two projectors so
that the computer screens of both instructors can be seen. This makes for
a very clear illustration to the students as to who does what.

- It is also effective to pair up students during this lesson and assign one
member of the pair to take the role of the owner and the other the role of
the collaborator. In this setup, challenges can include asking the
collaborator to make a change, commit it, and push the change to the remote
repository so that the owner can then retrieve it, and vice-versa. The
role playing between the instructors can get a bit "dramatic" in the
conflicts part of the lesson if the instructors want to inject some humor
into the room.

- If you don't have two projectors, have two instructors at the front of the
room. Each instructor does their piece of the collaboration demonstration
on their own computer and then passes the projector cord back and forth
with the other instructor when it's time for them to do the other part of
the collaborative workflow. It takes less than 10 seconds for each
switchover, so it doesn't interrupt the flow of the lesson.
And of course it helps to give each of the instructors a different-colored
hat, or put different-colored sticky notes on their foreheads.

- If you're the only instructor, the best way to create is clone the two
repos in your Desktop, but under different names, e.g., pretend one is your
computer at work:

```bash
$ git clone https://github.com/vlad/planets.git planets-at-work
```

- It's very common that learners mistype the remote alias or the remote URL
when adding a remote, so they cannot `push`. You can diagnose this with
`git remote -v` and checking carefully for typos.

- To fix a wrong alias, you can do `git remote rename <old> <new>`.
- To fix a wrong URL, you can do `git remote set-url <alias> <newurl> `.

- Before cloning the repo, be sure that nobody is inside another repo. The
best way to achieve this is moving to the `Desktop` before cloning: `cd && cd Desktop`.

- If both repos are in the `Desktop`, have them to clone their collaborator
repo under a given directory using a second argument:

```bash
$ git clone https://github.com/vlad/planets.git vlad-planet
```

- The most common mistake is that learners `push` before `pull`ing. If they
`pull` afterward, they may get a conflict.

- Conflicts, sometimes weird, will start to arise. Stay tight: conflicts are
next.

- Learners may have slightly different output from `git push` and `git pull`
depending on the version of git, and if upstream (`-u`) is used.

## [Conflicts](../episodes/09-conflict.md)

- Expect the learners to make mistakes. Expect _yourself_ to make mistakes.
This happens because it is late in the lesson and everyone is tired.

- If you're the only instructor, the best way to create a conflict is:

- Clone your repo in a different directory, pretending is your computer at
work: `git clone https://github.com/vlad/planets.git planets-at-work`.
- At the office, you make a change, commit and push.
- At your laptop repo, you (forget to pull and) make a change, commit and
try to push.
- `git pull` now and show the conflict.

- Learners usually forget to `git add` the file after fixing the conflict and
just (try to) commit. You can diagnose this with `git status`.

- Remember that you can discard one of the two parents of the merge:

- discard the remote file, `git checkout --ours conflicted_file.txt`
- discard the local file, `git checkout --theirs conflicted_file.txt`

You still have to `git add` and `git commit` after this. This is
particularly useful when working with binary files.

- Keep in mind that depending on the Git version used, the outputs for
`git push` and `git pull` can vary slightly.

## [Open Science](../episodes/10-open.md)

## [Licensing](../episodes/11-licensing.md)

We teach about licensing because questions about who owns what, or can use
what, arise naturally once we start talking about using public services like
GitHub to store files. Also, the discussion gives learners a chance to catch
their breath after what is often a frustrating couple of hours.

The Creative Commons family of licenses is recommended for many types of
works (including software documentation and images used in software) but not
software itself. Creative Commons [recommends][cc-faq-software] a
software-specific license instead.

## [Citation](../episodes/12-citation.md)

## [Hosting](../episodes/13-hosting.md)

A common concern for learners is having their work publicly available on
GitHub. While we encourage open science, sometimes private repos are the
only choice. It's always interesting to mention the options to have
web-hosted private repositories.

[github]: https://github.com/

[drawings]: https://marklodato.github.io/visual-git-guide/index-en.html

[github-privacy]: https://help.github.com/articles/keeping-your-email-address-private/

[github-line-endings]: https://docs.github.com/en/github/using-git/configuring-git-to-handle-line-endings

[github-line-endings-refresh]: https://docs.github.com/en/github/using-git/configuring-git-to-handle-line-endings#refreshing-a-repository-after-changing-line-endings

[github-gui]: https://git-scm.com/downloads/guis

[diffmerge]: https://sourcegear.com/diffmerge/

[git-it]: https://github.com/jlord/git-it

[git-it-electron]: https://github.com/jlord/git-it-electron

[code-school]: https://www.codeschool.com/

[try-git]: https://try.github.io

[git-parable]: https://tom.preston-werner.com/2009/05/19/the-git-parable.html

[repos-in-repos]: https://github.com/swcarpentry/git-novice/issues/272

[cc-faq-software]: https://creativecommons.org/faq/#can-i-apply-a-creative-commons-license-to-software
Loading