Get started with Github and Github Desktop


#1

This post is just to get you started on understanding and using Github in 5 mins.

This post is in no way gonna explain and tell you what and how Git works. I’ll link some sources down below for more information :stop_sign:.

What is Github?

Github is a web hosting service for version control using Git. It can be used for anything, But it’s mainly used for code.

Let’s get started now:

We’ll take one of our projects as use cases to start with.

  1. Open github.com and make an account if you haven’t already.
  2. Once the account is made go to codezoned’s organisation.

  1. For this tutorial we’ll contribute to ScriptsDump (It’s the same process for every repository)
    Open ScriptsDump repo and click on Fork (It’s present on the top right side of the page)

  2. After clicking on fork you’ll be redirected to the same instance of the repository in your account.

This is a fork. A fork is a copy of a repository. Forking a repository allows you to freely experiment with changes without affecting the original project.

  1. Now that you have forked ScriptsDump you can start playing with it. Now, click on “Clone or download”.
    Once you click on clone, An option will pop up asking whether to download a zip or to use Github Desktop, Click on Github Desktop.

  2. Download Github Desktop and let it install.

  3. Login to your Github Desktop and on the top left there’ll be an option called “File”. Click on file and then click on “Clone repository”.

  4. Once you click on clone repository a list of your repositories will pop up (Your forked repositories too).

  1. Now your forked repo (Repository = repo) will be downloaded in the specified directory, Navigate and have a look at it.

  2. Now that you have the repo ready it’s time to make some contributions :smile:.
    Make any changes and additions you want in the downloaded/cloned repo. In this case, I’ll create a folder called strings and add some dummy code in.

  1. Go to Github Desktop and view the changes you’ve done. Once you’ve reviewed your changes add a title and a description. After that, Commit the changes.

  1. Now go to your account and check the changes you’ve just pushed. If everything’s done properly, Congratulations :smile: on your first commit on github.

  2. Now that you have an updated instance of ScriptsDump (Or any other repository) go to the main repository (In case of ScriptsDump, It’s codezoned/ScriptsDump) and click on Pull requests.

  3. Click on new Pull request and a new page will pop up asking which branch of your forked repository should be merged with what branch of the main one. For this case, Select your (head fork) master branch and codezoned/ScriptsDump (base fork) master branch as well.

  1. Now the only thing left is for the admins to review that Pull request and if they think that everything is ok, They’ll merge it to the main repo.

That’s it. Congrats on your first PR :heart: (PR = Pull request). To understand Git and Github better you can visit these links:


#2

#3

Good job man, I’m sure it’ll give an amazing insight to a lot of people just getting started with github. :slight_smile: