How to Create a GitHub Repository

GitHub is a wonderful tool for beginner programmers to learn how to use. It allows for saving code to the cloud and continuous integration. In order to use GitHub developers commit, or add, changes to code in a shared repository, or folder. This allows…

GitHub is a wonderful tool for beginner programmers to learn how to use. It allows for saving code to the cloud and continuous integration. In order to use GitHub developers commit, or add, changes to code in a shared repository, or folder. This allows teams to work together and resolve issues early in the development process.



Create Repository

1. Open GitHub in a Browser
Pull up GitHub here.

2. Login or Create Account
If you are creating an account, remember to save your password!

3. Create a New Repo
Once you have successfully logged in, there will be a sidebar on the left of your screen. Click on the green new button with the book label.
Left Side Bar

4. Follow the Steps to Add Basic Information

  • Ensure No template is selected. We are not using a template today, but you are welcome to experiment with this in the future.

  • Choose a repository name. This should be unique, which the site will tell you. You can also add a description to your repository.

  • Decide public or private. This is your personal preference.

  • Select Add a README file. This includes a blank initial file in your repository.

When you are done select the green create repository button.
Basic Repository Creation



Clone to Machine

5. Click the Green Code Button
At this point, your repository will have opened up. In order to get a copy on your own machine, select the green code button in the top right corner.
Repository Home

6. Choose the Clone Option
Chose the copy link button under the Clone section in order to get the repository copied to your clipboard.
Clone Button

7. Open VS Code
Using VS code, which you can download and install here, editing code is much easier. Terminals are included in the IDE for easy access.

8. Select Clone Git Repository
Select the clone git repository option on the hope page, under the start panel.
VS Code Start Menu

9. Paste in the Copied link
Paste in the link we copied from GitHub into the box that says provide repository URL. Select Clone from URL.

10. Select or Create folder
Choose where you want to locally find this code.

11. Open Repository
Find a way to open the new cloned repository. There may be a popup on the right corner offering to open it. If you cannot find that you may select the Open Folder option in the start menu.
Open Repo Popup



Make Changes

12. Find README
Open the README file, which you should see in the left side bar. Clicking on it will open it.

13. Edit the Code
Add your changes to the code. The README is written in markdown. I just added a description to the repository.

# helloworld

This is a repository for teaching GitHub basics.

14. Save
Save your changes. You can also add more folders or files in any language. GitHub can handle it all.



Save to Github

15. Open a Terminal
Hover over the Terminal Header and select New Terminal.

16. Add Changes
Click into the terminal and type in the command git add .. This will save your changes.

17. Commit Changes
Use the command git commit -m “added readme description” to commit your changes with a message. You can decide what you want to write inside the quotes.

18. Pull
Use the git pull command before pushing your changes up to the GitHub. This ensure that any changes a teammate has made is in your local branch.

19. Push
Run the git push command. This will send any changes back to GitHub.



You did it!

In order to check that your changes were saved you can head back to GitHub. You will see a time stamp and commit message on the file.
Final Changes


Print Share Comment Cite Upload Translate
APA
Kern Designs | Sciencx (2024-03-29T05:20:37+00:00) » How to Create a GitHub Repository. Retrieved from https://www.scien.cx/2022/02/17/how-to-create-a-github-repository/.
MLA
" » How to Create a GitHub Repository." Kern Designs | Sciencx - Thursday February 17, 2022, https://www.scien.cx/2022/02/17/how-to-create-a-github-repository/
HARVARD
Kern Designs | Sciencx Thursday February 17, 2022 » How to Create a GitHub Repository., viewed 2024-03-29T05:20:37+00:00,<https://www.scien.cx/2022/02/17/how-to-create-a-github-repository/>
VANCOUVER
Kern Designs | Sciencx - » How to Create a GitHub Repository. [Internet]. [Accessed 2024-03-29T05:20:37+00:00]. Available from: https://www.scien.cx/2022/02/17/how-to-create-a-github-repository/
CHICAGO
" » How to Create a GitHub Repository." Kern Designs | Sciencx - Accessed 2024-03-29T05:20:37+00:00. https://www.scien.cx/2022/02/17/how-to-create-a-github-repository/
IEEE
" » How to Create a GitHub Repository." Kern Designs | Sciencx [Online]. Available: https://www.scien.cx/2022/02/17/how-to-create-a-github-repository/. [Accessed: 2024-03-29T05:20:37+00:00]
rf:citation
» How to Create a GitHub Repository | Kern Designs | Sciencx | https://www.scien.cx/2022/02/17/how-to-create-a-github-repository/ | 2024-03-29T05:20:37+00:00
https://github.com/addpipe/simple-recorderjs-demo