Sunday 8 November 2015

GitHub

Have you ever worked on Google Docs? It has got a feature of adding collaborators to your document and multiple people, wherever they might be, can edit the document at the same time, parallel to each other. You can even see the cursor of the other collaborators moving in real time with a history of edits made by every collaborator in a timeline.

When people work in teams to code on large projects, it becomes hard to keep the work collaborated on everyone's side. Copying all the files from one's computer and pasting it on his. Thereafter he has to read every line of code and change the edits he made which can be tedious and wastes a lot of time.

_________________________________________________________________________

So there is a term called "version control". 

"Version control is a system that records changes to a file or set of files over time so that you can recall specific versions later."  

Google about version control to know more about it.

Git comes into picture here.


"Git (/ɡɪt/) is a widely used version control system for software development."

Git was initially developed and designed by Linus Torvalds, father of Linux. A very popular platform for Git repository hosting is GitHub.

"GitHub is a Web-based Git repository hosting service"

More than 29 million projects are hosted on GitHub at present, with more than 11 million users. The beautiful part about this is that you can fork in the open-source projects and contribute to it and others can contribute in yours.
_________________________________________________________________________

SETTING UP GITHUB :

GIT TERMINOLOGY :

This will be a quick terminology introduction before you start using GitHub :
  • GIT : Git is an open source program for tracking changes in text files.
  • REPOSITORYA repository is the most basic element of GitHub. They're easiest to imagine as a project's folder.
  • COLLABORATOR : A collaborator is a person with read and write access to a repository who has been invited to contribute by the repository owner.
  • CONTRIBUTOR : A contributor is someone who has contributed to a project by having a pull request merged but does not have collaborator access.
  • BRANCH : A branch is a parallel version of a repository. It is contained within the repository, but does not affect the primary or master branch allowing you to work freely without disrupting the "live" version. When you've made the changes you want to make, you can merge your branch back into the master branch to publish your changes.
  • 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 and use Git to keep track of your changes without having to be online.
  • 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.
  • 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.
  • COMMIT : The changes you made in your repository are not in your repository yet. We could add or remove files from the stage before we store them in the repository.
    To store our staged changes we run the commit command with a message describing what we've changed. So basically, it records the changes to the repository.
Once you are clear with these terminologies, you are ready to go make your own Git repos and start adding collaborators and contributors and host an online repo and work on a perfectly collaborated project. To learn about the syntax of using GitShell, you will find the following videos very helpful. Thanks to LearnCode.academy for these videos.

  1. GitHub Tutorial part 1
  2. GitHub Tutorial part 2

An amazing way to perform your first Git commands is through https://try.github.io/ This a is very fine tutorial provided by GitHub itself. Do try it out! 

Enjoy forking and hosting repos!

Click here to get an idea of how to use GitHub if you want to contribute in projects. >> Version control ethics with GitHub

No comments:

Post a Comment