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

Prerequisites:

  • You will need to have Git installed. The Mac instructions are HERE (just follow them, contact me if you have any issues)

Terminology

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

The motivation

I’m as guilty as anyone. I keep making links for my content like the (image0 below that just say repo link

Image for post
Image for post

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):

Image for post
Image for post

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.

Image for post
Image for post

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.

Image for post
Image for post

You can than clock on open (after clicking the down arrow beside the Zip file)

Image for post
Image for post

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:

Image for post
Image for post

From this we can see the project that we want to open — the suffix is .xcodeproj which indicates that it is a Xcode project.

Image for post
Image for post

Now a simple double-click will open up Xcode and the project. You might get a warning about this —

Image for post
Image for post

Now I trust this “stevencurtis” and I recommend that you do too.

You should now see the project open in Xcode. Awesome!

Image for post
Image for post

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

Image for post
Image for post

You can then search for terminal

Image for post
Image for post

Clicking on this will open it.

You can then see something like the following:

Image for post
Image for post

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.

Image for post
Image for post

This gives us a link to clone (staring with https). This is the one to copy

Image for post
Image for post

Then back in our terminal window type

git clone https://github.com/stevencurtis/iosHelloWorld.git

followed by enter.

This then creates a new folder callediosHelloWorld. 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:

cd iosHelloWorld

cd hello

open hello.xcodeproj

now Xcode will open up!

Conclusion

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!

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store