Skip to content

Commit b3d5574

Browse files
done polishing collaboration section
1 parent 72c6f03 commit b3d5574

File tree

1 file changed

+26
-27
lines changed

1 file changed

+26
-27
lines changed

version-control.Rmd

Lines changed: 26 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -662,17 +662,17 @@ to enable write access.
662662

663663
### Pulling changes from GitHub using Jupyter
664664

665-
Below we walk through how to use the Jupyter Git extension tool to pull changes
666-
to our `eda.ipynb` analysis file that were made by our collaborator
665+
We will now walk through how to use the Jupyter Git extension tool to pull changes
666+
to our `eda.ipynb` analysis file that were made by a collaborator
667667
(Figure \@ref(fig:git-pull-00)).
668668

669-
```{r git-pull-00, fig.cap = 'The GitHub interface indicates the name of the last person to push a commit to the remote repositoey, a preview of the associated commit message, the unique commit identifier, and how long ago the commit was snapshotted.', fig.retina = 2}
669+
```{r git-pull-00, fig.cap = 'The GitHub interface indicates the name of the last person to push a commit to the remote repository, a preview of the associated commit message, the unique commit identifier, and how long ago the commit was snapshotted.', fig.retina = 2}
670670
image_read("img/version_control/git_pull_00.png") %>%
671671
image_crop("3584x1900")
672672
```
673673

674-
You can do this using the Jupyter Git tab by clicking on the cloud icon with
675-
the down arrow (Figure \@ref(fig:git-pull-01)).
674+
You can tell Git to "pull" by clicking on the cloud icon with
675+
the down arrow in Jupyter (Figure \@ref(fig:git-pull-01)).
676676

677677
```{r git-pull-01, fig.cap = 'The Jupyter Git extension clone button', fig.retina = 2}
678678
image_read("img/version_control/git_pull_01.png")
@@ -681,7 +681,7 @@ image_read("img/version_control/git_pull_01.png")
681681
Once the files are successfully pulled from GitHub, you need to click "Dismiss"
682682
to keep working (Figure \@ref(fig:git-pull-02)).
683683

684-
```{r git-pull-02, fig.cap = 'The Jupyter Git extension prompt after changes have been successfully pulled from a remote repository.', fig.retina = 2}
684+
```{r git-pull-02, fig.cap = 'The prompt after changes have been successfully pulled from a remote repository.', fig.retina = 2}
685685
image_read("img/version_control/git_pull_02.png")
686686
```
687687

@@ -693,7 +693,7 @@ image_read("img/version_control/git_pull_03.png")
693693
```
694694
695695
It can be very useful to review the history of the changes to your project. You
696-
can do this directly on the JupyterHub by clicking "History" in the Git tab
696+
can do this directly in the Jupyter by clicking "History" in the Git tab
697697
(Figure \@ref(fig:git-pull-04)).
698698
699699
```{r git-pull-04, fig.cap = 'Version control repository history viewed using the Jupyter Git extension.', fig.retina = 2}
@@ -713,17 +713,17 @@ image_read("img/version_control/merge_conflict_01.png") %>%
713713
image_crop("3584x1900")
714714
```
715715

716-
Usually, getting out of this situation is not too troublesome. First you need to
717-
pull the changes that exist on GitHub that you do not yet have on your machine.
718-
Usually when this happens, Git can automatically merge the changes for you,
719-
even if you and your collaborators were working on different parts of the same
720-
file!
716+
Usually, getting out of this situation is not too troublesome. First you need
717+
to pull the changes that exist on GitHub that you do not yet have in the local
718+
repository. Usually when this happens, Git can automatically merge the changes
719+
for you, even if you and your collaborators were working on different parts of
720+
the same file!
721721

722-
If however, you and your collaborators made changes to the same line of the same
723-
file, Git will not be able to automatically merge the changes---it will not know whether to keep your version of the line(s), your
724-
collaborators version of the line(s), or some blend of the two. When this
725-
happens, Git will tell you that you have a merge conflict and that it needs
726-
human intervention (you!), and which file(s) this occurs in (Figure \@ref(fig:merge-conflict-03)).
722+
If, however, you and your collaborators made changes to the same line of the
723+
same file, Git will not be able to automatically merge the changes---it will
724+
not know whether to keep your version of the line(s), your collaborators
725+
version of the line(s), or some blend of the two. When this happens, Git will
726+
tell you that you have a merge conflict in certain file(s) (Figure \@ref(fig:merge-conflict-03)).
727727

728728
```{r merge-conflict-03, fig.cap = 'Error message that indicates you and your collaborators made changes to the same line of the same file and that Git will not be able to automatically merge the changes', fig.retina = 2}
729729
image_read("img/version_control/merge_conflict_03.png") %>%
@@ -732,11 +732,9 @@ image_read("img/version_control/merge_conflict_03.png") %>%
732732

733733
### Handling merge conflicts
734734

735-
To fix the merge conflict we need to open the file that had the merge
736-
conflict in a plain text editor
737-
and look for special marks that Git puts in the file
738-
to tell you where the merge conflict occurred
739-
(Figure \@ref(fig:merge-conflict-04)).
735+
To fix the merge conflict, we need to open the offending file
736+
in a plain text editor and look for special marks that Git puts in the file to
737+
tell you where the merge conflict occurred (Figure \@ref(fig:merge-conflict-04)).
740738

741739
```{r merge-conflict-04, fig.cap = 'How to open a Jupyter notebook as a plain text file view in Jupyter.', fig.retina = 2}
742740
image_read("img/version_control/merge_conflict_04.png") %>%
@@ -748,17 +746,18 @@ conflict is preceded by `<<<<<<< HEAD` and the end of the merge conflict is
748746
marked by `>>>>>>>`. Between these markings, Git also inserts a separator
749747
(`=======`). The version of the change before the separator is your change, and
750748
the version that follows the separator was the change that existed on GitHub
751-
(Figure \@ref(fig:merge-conflict-05)).
749+
In Figure \@ref(fig:merge-conflict-05), you can see that in your local repository
750+
there is a line of code that calls `scale_color_manual` with three colour values (`deeppink2`, `cyan4`, and `purple1`).
751+
It looks like your collaborator made an edit to that line too, except with different colours (to `blue3`, `red3`, and `black`)!
752752

753753
```{r merge-conflict-05, fig.cap = 'Merge conflict identifiers (highlighted in red).', fig.retina = 2}
754754
image_read("img/version_control/merge_conflict_05.png") %>%
755755
image_crop("3584x1200")
756756
```
757757

758-
Once you have decided which version of the change
759-
(or what combination!) to keep,
760-
you need to use the plain text editor
761-
to remove the special marks that Git added (Figure \@ref(fig:merge-conflict-06)).
758+
Once you have decided which version of the change (or what combination!) to
759+
keep, you need to use the plain text editor to remove the special marks that
760+
Git added (Figure \@ref(fig:merge-conflict-06)).
762761

763762
```{r merge-conflict-06, fig.cap = 'File where a merge conflict has been resolved.', fig.retina = 2}
764763
image_read("img/version_control/merge_conflict_06.png") %>%

0 commit comments

Comments
 (0)