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
you must first visit [https://github.com/settings/tokens](https://github.com/settings/tokens),
501
+
which will take you to the "Personal access tokens" page in your account settings.
503
502
Once there, click "Generate new token" (Figure \@ref(fig:generate-pat-01)).
504
503
Note that you may be asked to re-authenticate with your username
505
504
and password to proceed.
506
505
507
-
(ref:generate-pat-01) The "Generate new token" button used to initiate the creation of a new personal access token. It is found on the Personal access tokens section of the Developer Settings page (accessed via the Settings menu).
506
+
(ref:generate-pat-01) The "Generate new token" button used to initiate the creation of a new personal access token. It is found in the "Personal access tokens" section of the "Developer settings" page in your account settings.
To send the committed changes back to the remote repository on
657
-
GitHub, we need to *push* them. \index{git!push} To do this we click on the cloud icon with the up arrow on the Jupyter Git tab
658
+
GitHub, you need to *push* them. \index{git!push} To do this,
659
+
click on the cloud icon with the up arrow on the Jupyter Git tab
658
660
(Figure \@ref(fig:git-push-01)).
659
661
660
662
(ref:git-push-01) The Jupyter Git extension "push" button (circled in red).
@@ -663,23 +665,25 @@ GitHub, we need to *push* them. \index{git!push} To do this we click on the clou
663
665
image_read("img/version_control/git_push_01.png")
664
666
```
665
667
666
-
We will then be prompted to enter our GitHub username
667
-
and password, and click the blue "OK" button (Figure \@ref(fig:git-push-02)).
668
+
You will then be prompted to enter your GitHub username
669
+
and password. Instead of your password, though, you will
670
+
need to enter the personal access token that you generated
671
+
earlier. Click the blue "OK" button to initiate the push (Figure \@ref(fig:git-push-02)).
668
672
669
673
```{r git-push-02, fig.cap = 'Enter your Git credentials to authorize the push to the remote repository.', fig.retina = 2, out.width="100%"}
670
674
image_read("img/version_control/git_push_02.png")
671
675
```
672
676
673
-
If the files were successfully pushed to our project repository on
674
-
GitHub we will be given the success message shown below.
675
-
Click "Dismiss" to continue working in Jupyter (Figure \@ref(fig:git-push-03)).
677
+
If the files were successfully pushed to the project repository on
678
+
GitHub, you will be shown a success message (Figure \@ref(fig:git-push-03)).
679
+
Click "Dismiss" to continue working in Jupyter.
676
680
677
681
```{r git-push-03, fig.cap = 'The prompt that the push was successful.', fig.retina = 2, out.width="100%"}
678
682
image_read("img/version_control/git_push_03.png")
679
683
```
680
684
681
685
If you visit the remote repository on GitHub,
682
-
you will see that the changes now exist there via their web interface
686
+
you will see that the changes now exist there too
683
687
(Figure \@ref(fig:git-push-04))!
684
688
685
689
```{r git-push-04, fig.cap = 'The GitHub web interface shows a preview of the commit message, and the time of the most recently pushed commit for each file.', fig.retina = 2, out.width="100%"}
To fix the merge conflict, \index{git!merge conflict} we need to open the offending file
824
+
To fix the merge conflict, \index{git!merge conflict} you need to open the offending file
821
825
in a plain text editor and look for special marks that Git puts in the file to
822
826
tell you where the merge conflict occurred (Figure \@ref(fig:merge-conflict-04)).
823
827
@@ -929,5 +933,4 @@ you can expand your knowledge through the resources listed below:
929
933
and [*Happy Git with R*](https://happygitwithr.com/) are great resources to take the next steps in learning about Git and GitHub.
930
934
-[Good enough practices in scientific computing](https://journals.plos.org/ploscompbiol/article?id=10.1371/journal.pcbi.1005510#sec014)[-@wilson2014best] provides more advice on useful workflows and "good enough" practices in data analysis projects.
931
935
- In addition to [GitHub](https://github.com), there are other popular Git repository hosting services such as [GitLab](https://gitlab.com) and [BitBucket](https://bitbucket.org). Comparing all of these options is beyond the scope of this book, and until you become a more advanced user you are perfectly fine to just stick with GitHub. Just be aware that you have options!
932
-
- If you need additional help generating and using a personal access token with GitHub,
933
-
[GitHub's documentation on creating a personal access token](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token) and the *Happy Git with R*[Cache credentials for HTTPS](https://happygitwithr.com/credential-caching.html) chapter are excellent additional resources for this.
936
+
-[GitHub's documentation on creating a personal access token](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token) and the *Happy Git with R*[cache credentials for HTTPS](https://happygitwithr.com/credential-caching.html) chapter are both excellent additional resources to consult if you need additional help generating and using personal access tokens.
0 commit comments