Aniruddha Belsare
Assistant Professor of Disease Ecology
Email: abelsare@auburn.edu
Website: https://avbelsare.netlify.app
Twitter: https://twitter.com/anyadoc
Step-by-step instructions for setting up a Github account
- Sign up for a new Github account: https://docs.github.com/en/get-started/signing-up-for-github/signing-up-for-a-new-github-account
The following links are from https://docs.github.com/en
Types of GitHub accounts: https://docs.github.com/en/get-started/learning-about-github/types-of-github-accounts
Choose Personal account - GitHub Free.
- Creating a new repository Login to your GitHub account. Click on the '+' in the top right corner and then click 'New Repository'.
Then follow the steps described here: https://docs.github.com/en/get-started/quickstart/create-a-repo
- Creating a folder in your repository
Click 'Add file' and then 'Create new file' from the drop-down list.
In the box 'Name your file...', type the folder name followed by a '/'. e.g. References/
A new box will appear after the / where you enter the file name. You must enter some text - e.g. filename.txt
Then click on 'Commit new file' and your folder is created!
Uploading files in this folder is straightforward: Click on 'Add file' and then select the 'Upload files' option from the drop-down list.
- Adding a file to the repository
Files that you add to a repository via a browser are limited to 25 MB per file. You can add larger files, up to 100 MB each, via the command line.
- Saving a repository maintained by another Github user with stars
See here: https://docs.github.com/en/get-started/exploring-projects-on-github/saving-repositories-with-stars
Follow these steps:
- Log into your Github account and search for the desired repository. The search window is in the top left corner of the page.
- This will take you to the main page of the repository maintained by the Github user. In the top-right corner of this page, click Star.
Starring makes a reporsitory easy to find later and also shows appreciation to the repository maintainer.
- Forking a repository
See here: https://docs.github.com/en/get-started/quickstart/fork-a-repo
Click Fork on the top-right corner of the main repository page.
Forking creates your copy of the repository, thus allowing you to freely experiment with changes without affecting the original project.
- Cloning a Github repository
Download Github Desktop: https://desktop.github.com/
Clone a Github repository with Github Desktop to create a local repository on your computer. The repository is stored in a folder titled 'Github' inside your Documents folder; alternatively, you can choose any location on your computer.
- Uploading changes to Github Remember the order of execution: Pull, Fetch, Commit, Push
- First, make changes to the code and save. This will save the changes locally.
- Then, open Github Desktop. The very first thing to do is PULL. This literally pulls any changes other collaborators might have made before you Commit or Push anything to GitHub. Bad things will happen if you miss this step!
- Now, Fetch changes on your local machine by clicking the Fetch origin button.
- Commit your changes by adding a commit comment in the text box (lower left) and then pressing Commit to main.
- Finally, Push your commits to Github for your collaborators to see. (Push origin button or click on Repository and select Push from the drop down list.