Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
8 changes: 4 additions & 4 deletions episodes/01-basics.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ to keep track of what one person did and when.
Even if you aren't collaborating with other people,
automated version control is much better than this situation:

!["notFinal.doc" by Jorge Cham, <https://www.phdcomics.com>](fig/phd101212s.png){alt='Comic: a PhD student sends "FINAL.doc" to their supervisor, but after several increasingly intense and frustrating rounds of comments and revisions they end up with a file named "FINAL_rev.22.comments49.corrections.10.#@$%WHYDIDCOMETOGRADSCHOOL????.doc"'}
!["notFinal.doc" by Jorge Cham, <https://www.phdcomics.com>](fig/phd101212s.png){alt='Comic: a PhD student sends "FINAL.doc" to their supervisor, but after several increasingly intense and frustrating rounds of comments and revisions they end up with a file named "FINAL_rev.22.comments49.corrections.10.#@$%WHYDIDCOMETOGRADSCHOOL????.doc"' style="filter:invert(0);"}

We've all been in this situation before: it seems unnecessary to have
multiple nearly-identical versions of the same document. Some word
Expand All @@ -38,20 +38,20 @@ think of it as a recording of your progress: you can rewind to start at the base
document and play back each change you made, eventually arriving at your
more recent version.

![](fig/play-changes.svg){alt='A diagram demonstrating how a single document grows as the result of sequential changes'}
![](fig/play-changes.svg){alt='A diagram demonstrating how a single document grows as the result of sequential changes' style="filter:invert(0);"}

Once you think of changes as separate from the document itself, you
can then think about "playing back" different sets of changes on the base document, ultimately
resulting in different versions of that document. For example, two users can make independent
sets of changes on the same document.

![](fig/versions.svg){alt='A diagram with one source document that has been modified in two different ways to produce two different versions of the document'}
![](fig/versions.svg){alt='A diagram with one source document that has been modified in two different ways to produce two different versions of the document' style="filter:invert(0);"}

Unless multiple users make changes to the same section of the document - a
[conflict](../learners/reference.md#conflict) - you can
incorporate two sets of changes into the same base document.

![](fig/merge.svg){alt='A diagram that shows the merging of two different document versions into one document that contains all of the changes from both versions'}
![](fig/merge.svg){alt='A diagram that shows the merging of two different document versions into one document that contains all of the changes from both versions' style="filter:invert(0);"}

A version control system is a tool that keeps track of these changes for us,
effectively creating different versions of our files. It allows us to decide
Expand Down
2 changes: 1 addition & 1 deletion episodes/09-conflict.md
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ hint: (e.g., 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
```

![](fig/conflict.svg){alt='A diagram showing a conflict that might occur when two sets of independent changes are merged'}
![](fig/conflict.svg){alt='A diagram showing a conflict that might occur when two sets of independent changes are merged' style="filter:invert(0);"}

Git rejects the push because it detects that the remote repository has new updates that have not been
incorporated into the local branch.
Expand Down