Downloading Repos from GitHub
If you want to Download existing work from GitHub…you might need a guide
Those starting to develop will notice there are GitHub repos, and that people who write tutorials often assume that their readers understand how to download these materials. If you need a little more help, this is the tutorial for you!
If you’d like the video version that’s here: https://youtu.be/ji-wU-s1DNY
- You will need to have Git installed. The Mac instructions are HERE (just follow them, contact me if you have any issues)
Git: Git is a distributed version-control system for tracking changes in source code during software development
GitHub: GitHub is a core hosting platform for GitHub repositories
Repository: A repository is a file location where you store all of the related files for the current project. A local repository resides on your system, a remote repository (generally) lies on a remote machine. A code project can consist of multiple repositories across multiple accounts, but commonly is a repository from a single account. Repositories (also known as Repos) are recommended to be kept under 1GB.
Terminal: an interface that allows you to access the command line
I’m as guilty as anyone. I keep making links for my content like the (image0 below that just say repo link
And this just assumes that you know how to download from that link.
Well, no longer. You can follow along with the link to that HelloWorld Repo. This takes you to a screen with many buttons, but I will draw your attention to the green buttons (Don’t worry, you don’t need to sign up):
On the right there is the Clone or download button. Clicking on the button gives two options — either we Open in Desktop or we Download ZIP.
This simplest process is to Download ZIP.
Downloading a project from Xcode: Method 1
If you are using the Chrome Webbrowser it will show you at the bottom of the screen that you have downloaded the files.
You can than clock on open (after clicking the down arrow beside the Zip file)
Open brings you to the folder, which you can then double-click on to open.
This reveals a folder with another folder — this is the one with the project that we need to open:
From this we can see the project that we want to open — the suffix is
.xcodeproj which indicates that it is a Xcode project.
Now a simple double-click will open up Xcode and the project. You might get a warning about this —
Now I trust this “stevencurtis” and I recommend that you do too.
You should now see the project open in Xcode. Awesome!
Downloading a project from Xcode: Method 2
There is an alternative to downloading the repo using a zip.
It involves using the Terminal.
Perhaps the best way to load the terminal is by loading the launchpad from the icon on the Dock
You can then search for terminal
Clicking on this will open it.
You can then see something like the following:
Now the simplest way of doing this is to go to that HelloWorld Repo.
We look at the Clone or download button, and then press it.
This gives us a link to clone (staring with https). This is the one to copy
Then back in our terminal window type
git clone https://github.com/stevencurtis/iosHelloWorld.git
followed by enter.
This then creates a new folder called
iosHelloWorld. Now if you want to use finder to open the project you can do that, but if you want to use termial read on.
Type the following:
now Xcode will open up!
I hope this has been helpful to you. For me, one of the best ways of learning has been to look at other’s work and this guide has been designed to help you get through using Git for the first time to get those repos on your machine! Thank you for reading…
The Twitter contact:
If you’ve got questions I’d love for you to get in touch with me. https://twitter.com/stevenpcurtis is a great channel for communication. Say HI!