GitHub is one of the most popular version control system among developers. It helps us to collaborate on code. For larger companies, GitHub helps to manage their development workflow. Is it sounds like its only a geeks thing? obviously not! Students can also use GitHub to show off their projects to the world and also they can do group projects. The official GitHub terms and services says that it can be used to do almost anything. It also says that GitHub has everything in its power to ensure that you retain total ownership of any projects you upload to the site.
lets know more about GitHub:

  • GitHub is a Web-based hosting service for software development project:
    GitHub is an online facility where projects are made available for others to access and make contributions. Projects are maintained and managed in repositories. Repositories are simply a location in GitHub where project’s files are stored.
  • Git is a Distributed Version Control System (DVCS) :
    Git is a software tool for managing the contents and version control of a repository, independent of GitHub. Git is free and distributed under the GNU General Public License. If users want to contribute to an existing project or use that project as the basis for their own development work, they will “fork” the project repository. This means taking a copy of it and creating a new repository under their user account on GitHub. To modify the contents of a repository, or add new content, users must “clone” their forked repository to create a copy of it on their local machine. Any changes made to that local copy are “committed” and then “pushed” back to their forked repository on GitHub using Git commands.
  • GitHub is not just for code:
    GitHub is also used for managing the documentation and data that accompany projects.
  • GitHub is social:
    Just like a social networking site, individuals who participate on GitHub have profiles that share details about who they are. Individuals can watch repositories, follow other users’ activities, and interact with their peers. If you are applying for a company nowadays, they will first check your GitHub profile.
  • GitHub likes open source:
    GitHub makes it easy for even a new programmer to quickly fork a project, explore and change it. In the past, developers often worked in isolation without access to community groups for support. Now, searching for, downloading, managing and the social aspects of software development are wrapped into one online environment.

 

So GitHub is not just a website, Its a community which anyone can showcase their skills to the general public. Its really an awesome experience, browsing others projects and working on our own.
As i said earlier, GitHub is NOT actually a geeky thing!. Anyone with an e-mail ID can create a GitHub account and showcase their projects in it.

So… Lets begin..

 

Creating a GitHub Account

A GitHub profile is simply the Hub of all your projects and your creations. Just like a Facebook profile, it will also contain information about things you are interested in. It also have a profile picture 😀 😛
For creating a GitHub profile:

  1.  1. Go to http://www.github.com
    github-home
  2. 2.Click on Sign up button, Fill up the required details and click create an account button.
    Github_Create new user
  3. 3. Select the free plan and click on finish sign up button
    Github_New user finish
  4. Now you have successfully created your GitHub profile. You can see the page below.
    Screenshot (384)

This is your GitHub Dashboard! Just explore it yourself…

Your profile is now available at www.github.com/username 🙂 You can view your profile by clicking on the avatar located at the top right corner and choosing “Your Profile” option. Their is an option to edit your profile. Give it a try and customize your profile. Don’t forget to check your e-mail for the confirmation e-mail from GitHub for verifying your account. After you are verified you have a fully functional GitHub account.
confirm_github

 

Download GitHub for windows

As this tutorial is for beginners i am not mentioning about the command line tools of GitHub. Lets familiarize the GUI tool first.

  1. Go to https://windows.github.com/ and download GitHub for Windows
  2. Download the setup file and open it. Its an online setup, it requires an active internet connection.
  3. After completing the setup it will open the GitHub for windows app, if not! open the GitHub app manually from the start menu.
  4. Sign in using the same username/email ID and password and follow the onscreen instructions.

 

Creating your first project

Now you have the GitHub for windows app and you are ready to go.

  1. Go to https://www.github.com/
  2. You can see the + sign at the top right corner of the page. Click on that + icon and select “New Repository”
    Screenshot (389)
    Type a project name, type a description. Chose the repository type as public. Check the “Initialize with Readme” checkbox.  Click create repository button.
  3. You can now see the created repository.
    Screenshot (390)Your repository is now visible for everyone at www.github.com/username/project_name

 

Lets add code to your project

In this example we are going to create a simple hello world app in C++

  1. Open GitHub For windows (login, if you hadn’t done it yet)Screenshot (388)
  2. Click on the + icon, click on the clone tab then select the project name from the list. Then click on the clone button.  Chose a location for the project and press ok button.
    Screenshot (391)
  3. Now you can see this screen
    Screenshot (392)
  4. After it is complete, you now have the local copy of your project in your computer.
    just click on the gear icon on the top right and select Open in explorer option.
    Screenshot (393)
  5. You can now see your project’s files in the explorer.
    Screenshot (394)
  6. Just add the files you want to that folder
    Screenshot (395)
  7. Now go back to the GitHub For windows app. You will now see this:
    Screenshot (396)
  8. Type a brief description of changes you have made in the summary and description input box and click on commit to master button.
  9. Now the changes are saved locally, You will have to sync it to the GitHub servers.
    Click on the sync button.Screenshot (397)After syncing it shows this screen:
    Your repository is now synced
  10. You can go to Github.com/username/project to check it out
    Screenshot (399)

 

 

GitHub Terminology

Repository: A repository is the most basic element of GitHub. They’re easiest to imagine as a project’s folder. A repository contains all of the project files (including documentation), and stores each file’s revision history. Repositories can have multiple collaborators and can be either public or private.

 

User: Users are personal GitHub accounts. Each user has a personal profile, and can own multiple repositories, public or private. They can create or be invited to join organizations or collaborate on another user’s repository.

 

Pull: Pull refers to when you are fetching in changes and merging them. For instance, if someone has edited the remote file you’re both working on, you’ll want to pull in those changes to your local copy so that it’s up to date.

 

Pull Request: Pull requests are proposed changes to a repository submitted by a user and accepted or rejected by a repository’s collaborators. Like issues, pull requests each have their own discussion forum.

 

Push: Pushing refers to sending your committed changes to a remote repository such as GitHub.com. For instance, if you change something locally, you’d want to then push those changes so that others may access them.

 

Private Repository: Private repositories are repositories that can only be viewed or contributed to by their creator and collaborators the creator specified.

 

Organizations: Organizations are a group of two or more users that typically mirror real-world organizations. They are administered by users and can contain both repositories and teams.

 

Fork: A fork is a personal copy of another user’s repository that lives on your account. Forks allow you to freely make changes to a project without affecting the original. Forks remain attached to the original, allowing you to submit a pull request to the original’s author to update with your changes. You can also keep your fork up to date by pulling in updates from the original.

 

Commit: A commit, or “revision”, is an individual change to a file (or set of files). It’s like when you save a file, except with Git, every time you save it creates a unique ID (a.k.a. the “SHA” or “hash”) that allows you to keep record of what changes were made when and by who. Commits usually contain a commit message which is a brief description of what changes were made.

 

Contributor: A contributor is someone who has contributed to a project by having a pull request merged but does not have collaborator access.

 

Clone: A clone is a copy of a repository that lives on your computer instead of on a website’s server somewhere, or the act of making that copy. With your clone you can edit the files in your preferred editor.

 

Private V/S Public Repositories

GitHub provides two types of plans: free plans and paid plans. While signing up for GitHub you can create only public repositories.

Both plans have the exact same features. They can have any number of public repositories, with unlimited collaborators.

However, paid accounts can create private repositories. Public repositories are viewable by anyone, while private repositories have their visibility limited to just you and your collaborators.

 

 

GitHub love students

Yes, its true. Students can even get private repositories for free 😀 . GitHub Is also offering premium software and other goodies to students completely for free. Check out the GitHub education site.

 

So… what are you waiting for! Join GitHub Now!..

links:

Follow me on GitHub: http://github.com/gautamkrishnar/
Learn more about GitHub:  https://help.github.com/

 

Checkout my blog on GitHub CLI  🙂 http://www.gautamkrishnar.com/a-guide-to-github-cli/

%d bloggers like this: