Github Tutorial for Beginners

Open source platforms are very popular due to its extensive range of features. These are absolutely the best for developers in the overall development process. Moreover, there is no need to pay a single penny for such softwares as all of these are freely available on the internet.

What is GitHub?

Basically, Github is a hosting platform that lets you and others work together on projects from anywhere. It is a development platform which is mainly built for developers. It is inspired by the way developers work.

github

Basic Fundamentals

While working with Github, there are some basic steps which you must know such as:

  1. Create Account on Github.
  2. Fork the Project & Clone Locally.
  3. Create an upstream Remote and Sync your Local Copy Before you Branch.
  4. Do some work.
  5. Push the New Branch to Your Fork on Github.
  6. Create the PR.
  7. Review by the Maintainers.

First of all, you must have a github account which is compulsory. If you are beginner then create an account by using following steps:

  • Write the following URL and press enter GitHub.
  • Fill the username, email, and password in the supplied field and click Sign up for Github.
  • Select the Unlimited public repositories for free option.
  • You will receive a verification email at the address provided.
  • Click the emailed link to complete the verification process.

After creating the Github account, a local fork of the project is required.
For this, you have to press the “fork” button on Github. After clicking a fork button, the copy of the project will be created on your own github account and you'll see a note that it's been forked underneath the project name.

Once forking is done, we need to clone the fork to our local machine.
Find the "SSH clone URL" in the right hand column and use that to clone locally using a terminal.

$ git clone [email protected]:akrabat/zend-validator.git

After cloning, change it into the new project's directory:

$ cd zend-validator

After forking, create an upstream remote and sync your local copy before you branch. Firstly clock on the link to the real repository – it's labeled as "Forked from" at the top of the Github page.

It brings you back to the projects main Github page, so you can find the "SSH clone URL" and use it to create the new remote, which we'll call upstream like:

$ git remote add upstream [email protected]:zendframework/zend-validator.git

Once upstream remote is created you get the opportunity to contribute to the project.
It is the best way to start by settling a bug that is either irritating you or you've found on the project's issue tracker.

In case you're searching for a place to begin, there is the number of projects which use the "easy pick" label to show that this issue can be tended to by another person to the project.

Now put each piece of work on its own branch. If the project is using git-flow, there are two branches:

  • Master Branch
  • Develop Branch

According to the general rule, if you are bug fixing, then you are from the master branch and if you are adding a new feature then you are from developing branch.

  • The next step after pushing the new branch is submitted a pull request.
  • You will see a big green button on the fork of your github screen asking you to submit your new branch as a pull request.
  • send a message with details about what you changed.

Make sure to reference the original proposal and any other issues this pull request fixes or addresses. At last your whole work is reviewed by the maintainers.

AUTHOR

READ NEXT

Boostlog is an online community for developers
who want to share ideas and grow each other.

Bitcoin Gambling

Delete an article

Deleted articles are gone forever. Are you sure?