What is GitHub for a beginner and how to get started with it?

I understand what you have been facing.Lets start with a few basics shall we ?Terminology :

Repository : A repository is a folder inside which you are going to store every piece of your codeFork : Copying someones repository into your account is called forking.Upstream : The guy or organisation which owns the code that you forked.

1. What is Git ?

Version Control System ( Keep reading and this will make sense towards the end ) .Lets say you have a project you want to work on. Now you have 2 primary motives. (a) To write some code(b) To take up the project as a team , meaning that more than one people are going to be responsible for writing the code.

So suppose you write a "Hello World!" program and then your friend/other developer decides that it should say "Hello, I am awesome"instead of the original "Hello World!".

Even for this little piece of code, you will have a copy in your PC and your friend will have one in his PC. Lets say you change the code, now at this point your friend wouldn't know the changes you have made and vice versa.

This is where the Git magiccomes. 1. Git lets you save your code online. 2. Git will allow all the developers of a project to see what changes the other one has made. 3. It allows you to discuss issues in your code with other developers.And a lot more…

If you forked someones repository ( Forked , explained under terminology, scroll up ) then follow these instructions Fork A Repo · GitHub Help and then the commands below.

If you are the upstream yourself ,( ie. you are the guy who created the original repository ) then follow the instructions below

$ git clone <add the repository address here>( Clones/copies everything from that repository to your local machine ) $ git add filename.extension(this adds the file you want to change on the server)$ git commit(this commits your changes to the repository with an explanation message)$ git push origin master(this finally sends all your changes to the server. This is the final step of changing the code on your repository on the server)