Getting Started With GitHub

Krazyy Krunal
Design & Code
Published in
5 min readMay 7, 2018

First of all, a very warm welcome to all of you on behalf of Design & Code team. This week we are exploring the world of theming mobile devices with Substratum. Today we will be getting familiar with GitHub and so to say the Git as a larger domain. So lets get started !

What is GitHub?

You will find a lot of definitions around the World Wide Web, but if you ask me, I would like to define it as follows :

A common software development platform for version controlling, project sharing and collaborative workspace with enhanced tools and services to aid the objective

It is used for version control of your projects using Git as technicals describe. There are many other services like GitLab, BitBucket etc which serve for the similar goal, but in this tutorial we will be dealing only with GitHub.

Git Jargons

These are some terms you should get familiar with while using GitHub or any other Git service. GitHub Glossary basically covers all these terms, So make sure to go through this before proceeding ahead !

Creating your first Project on GitHub

Creating your first project on GitHub is as simple as signing up and clicking on the “Start new project” button on the home page. With some self explanatory instructions, you are ready to kick in for your first project on GitHub. In this example I’m going to host my fractal wall generator Python project

Once you are done with this step, you will be then requested to add content to your project using 3 methods as shown below. For this project, I’m going to use first method

Before stepping ahead, you must have Git installed on your workstation to continue. You can download the required from here https://git-scm.com/downloads

Done? Great ! Now just go to your directory where your project is and open a terminal/powershell/cmd/gitbash or whichever terminal software you prefer. Copy the commands from the page and paste them in the terminal, Make sure your current working directory is same as your project’s !

Press “Enter” to execute the commands, you will be required to login into your GitHub account to continue for this process

When you are done, refresh your project page and you should see your project directory up and running!

Now we are going to push (Add from local to remote) our script file on our repo using git commands. First of all we are going to “git add WallGenFract.py” and then commit this change using “git commit -m ‘Added Script File’ “ and lastly push it to repo using “git push” command. It may ask you to login. Once done, you should see the changes immediately on a quick refresh to your project page ! You can use add command as many times you want to add multiple files also you can use “git add .” to add all files from your directory. With this you have finally hosted your project successfully on GitHub !

GitHub #5

Cloning Projects

Cloning in Git means having a copy of your online repo to your local workstation. It would be stored locally on your computer where you can access it and modify it according to your need. For a quick tutorial, we are going to clone the project we just hosted in different directory

First of all navigate to an empty directory and open a terminal. Go to your project page and press on “Clone or download” button and copy the link to your clipboard

Now in your terminal type “git clone <link_goes_here>” and press enter. You should see some process taking place and upon successful execution you will see something like this

You should have your project ready in that directory. See, Isn’t it easy?

With this, we have completed this quick tutorial of GitHub basics. There’s more to it, but we are not going into those details today. I’ll leave resources which you can refer in case you want in-depth knowledge of GitHub and Git as a whole.

Exercise

Now as you have just completed this tutorial, Here is a small exercise for you to do !

  1. Create an empty directory called “Substratum Theme Template” on your workstation
  2. Open any terminal software and use “git clone” command to clone the repository available here https://github.com/substratum/template
  3. If you are facing any issues, try to resolve them by referring to official documentation, debugging or Stackoverflow (Hehe). Please avoid using “Download Zip” option

Resources

Official Documentation : https://guides.github.com/

In Depth Tutorial : https://www.youtube.com/watch?v=3RjQznt-8kE&list=PL4cUxeGkcC9goXbgTDQ0n_4TBzOO0ocPR

Our Design & Code team would be always happy to help you in case of any queries or suggestions etc. You can get connected with us on Twitter & Instagram. You can also join our official Google+ Community to be part of our family.

You can connect with me (Krunal Gediya) on Google+, I’m an Android Developer. I also develop software in fields of AR, VR, Machine Learning and built some Web based games. And also a core member at Design & Code

#DnCWeeklyTutorials #GitHub #Substratum #Week1

--

--

Krazyy Krunal
Design & Code

XR Developer | SnapAR Lens Ambassador | Certified Meta Spark Creator | Co-head @ XDG मुंBAI