-
Notifications
You must be signed in to change notification settings - Fork 1
Installing GitHub Desktop & Git
Calum Childs edited this page Oct 4, 2023
·
4 revisions
Welcome to the wiki for this repository! This page will show you how to install Git and GitHub Desktop.
For beginners, we recommend GitHub Desktop. For those who feel more confident, use Git. (Even if you use GitHub Desktop, I recommend you have a look at the Git commands and how they work.)
- Download and install GitHub Desktop.
- Sign in with your GitHub.com account.
- Keep the default settings and click the blue "Finish" button.
- Select a repository that you want to "Clone" (copy) onto your computer then press the blue "Clone" button.
- Choose where you want to store your repository. Make sure you remember where you stored it. (Quick tip: It's best to avoid storing your local repository inside any OneDrive/Google Drive/etc. folders, as this can cause problems when you are trying to push your updated code to GitHub.)
- Click the blue "Clone" button.
- That's it! Now you can edit code and push it to your GitHub repository. Then you can make a pull request to the original repository with your updated code.
- Download and install Git for your operating system.
- Once Git has been installed, open the application called Git Bash. Search for it if you need to.
- Then navigate to the area where you want on your computer in Git Bash using the
cd
command. (So if you want to store your repository inside a folder calledFuture
that's inside yourDocuments
folder, enter the commandcd Documents/Future
and press Enter.) - Now get your repository from GitHub using the
git clone (repository URL)
command. To get your repository URL, navigate to your repository, click the green Code button and copy the URL beginning with https://github.com (as shown below.) - Now you should have a copy of the repository located locally on your computer.
When you need to commit something to your repository, enter these two commands in order. Make sure your command line's directory is the same as the code that you want to commit.
-
git add .
, which will add all the files in this directory. (If you haven't added any files since the last time you committed, you can skip this step.) -
git commit -a "Update"
will commit any changes you made to the local repository with the change note "Update". -
git push
will push the code to your GitHub repository.