Day 3 On your own:
Contents
Day 3 On your own:#
1. Create a GitHub account#
Visit the GitHub website and create an account if you don’t already one. You can skip step this if you already have a GitHub account.
2. Create a fork from CTSM-Tutorial-2022 repository#
You don’t have access to write directly to the main CTSM tutorial repository (that right is reserved for the tutorial developers), so you need to create your own copy of the repository to save your changes. For this, you will fork the CTSM tutorial repository.
To Do: Create a fork#
You can create your own fork of the CTSM tutorial repository by using the fork button in the upper right corner of the CTSM tutorial reository page.
Login to your GitHub account.
Navigate to the original CTSM tutorial repository.
Use the
fork
button to create a fork of CTSM repository in your account NOTE: The image below is from the CTSM repository, but the GitHub interface looks the same for the tutorial repository.
Your forked repository will be under your account name:
https://github.com/YOUR-USER-NAME/CTSM-Tutorial-2022
For example, for the username (wwieder) the forked repo is:
https://github.com/wwieder/CTSM-Tutorial-2022
You can make any modifications you’d like to your forked repository. Note that you only have to fork a respository once – it will always be connected to your GitHub account unless you delete it.
3. Pushing your changes to the outside world:#
To start, connect your forked repository to the computing system you are using. You can do so by using the following:
WARNING!
Please replace “YOUR_USER_NAME” in the code below with your own GitHub username (created in step 1).
git remote add YOUR_USER_NAME https://github.com:YOUR_USER_NAME/CTSM-Tutorial-2022.git
Finally, push your changes to the remote repository. Note that ‘pushing’ the changes makes the changes visible to anyone who looks at your GitHub repository, including your collaborators.
git add -a
git commit -m 'all my notebook changes'
git push YOUR_USER_NAME
To see your changes now you can go to your fork and look for your ‘main’ branch on github.com. You should be able to see your recent changes.