Complete Github Guide

-Vishal Rajput           05/06/2020

github

Source: github.com

Are you an individual developer or working in a team on some project? Today Github is the platform that provides teams to work on projects and make changes remotely. In this article I will help you understand why Github is useful for you and we will cover all the important features for you to learn.So let's get started:

Why Github?

github

Let's say you are working on a project, for example, an Android App. Now you have a team and you want them to make some changes in the code or introduce new features in the application. Team members are in different places so how will you make some changes in the codebase and at the same time view the changes that your team members have made? Github allows us to upload your project on the website github.com and team members can view the code and make some changes in it.Changes they have made will reflect for all the team members.Now let's understand some terms that Github uses.We will create a small project and we will see how this works.

Github Terms:

github

Here are some terms in Github that you will commonly use.We will discuss each of them in detail.

  1. Repository: A Repository (repo) is just the folder which contains your whole project
  2. Commit: It refers to the action of making changes in the code.
  3. Readme: It gives the idea about the project details.
  4. GitHub Gist: instantly share code, notes, and snippets.
  5. Fork: A fork is a copy of a repository. Forking a repository allows you to freely experiment with changes without affecting the original project.
  6. Branches: Use a branch to isolate development work without affecting other branches in the repository. Each repository has one default branch, and can have multiple other branches. You can merge a branch into another branch using a pull request.
  7. Pull Requests: Pull requests let you tell others about changes you've pushed to a GitHub repository. Once a pull request is sent, interested parties can review the set of changes, discuss potential modifications, and even push follow-up commits if necessary.

Step 1: Create a Repository

github

Create an account on github and create on + icon and choose New Repository.

Step 2: Repository Details

github tutorial

Choose the name of your project and make sure to enable Initialize Readme.

Step 3: Upload Files to the Repository

github tutorial

Now your project is ready and can be viewed by your team members.You can also create private repository.

Step 4: Commit Changes

github tutorial

Now just choose the files you want to uplaod and commit changes. You can Learn more about branches by going to the link as seen in the image.

Congratulations you have now just created your new repository and now your team can make changes to it by creating branches.You can approve a branch if you feel the changes or featuresare helpful. In order to hide credentails use .gitignore to ignore any sha keys or passwords!! There are a lot of useful repositories that can give you some project ideas just search them on Github and fork them and you can also contribute to open source community.