GitHub: The Social Network for Code.
Ever wondered how thousands of developers collaborate on a single project without breaking things? This post demystifies GitHub, the world’s most popular version control platform. From understanding the heart of Git to mastering essential terms like "forking," "commits," and "branches," we explore how GitHub makes sharing code as easy as sharing a status update, but with much more impact.
As per Github, It is the best place to share code with friends, co-workers, classmates, and complete strangers. More generally i call it Coding Social Network You don’t push status updates but Repositories and chunks of code :) . Oh! ya you can comment here as well, well thats different comment don’t get confused with Facebook ones ;)
GIT, the heart of Github makes it very special, GIT is an open source project started by Linus Torvalds - Linux creator. Git is a version control, used to manage changes in programs, sites, docs and also keep the record (version) history.
Github is actually more than that, The flagship functionality of github is “forking”. The other main features are Pull request and merge
Unlike GIT, Github can be accessed via Graphical user interface as well.
While talking about Github some terms must be remembered
Repository: It is a place where your project is stored.
Version Control: It keeps the snapshot of every chunk of code, if over written or added to any file. It keeps of track of all files which are present or changed and the code in those files as well.
Commit:
This is where you take snapshot of repository after adding changes to repo and before pushing.
Push: It means updating the code on particular repository.
Command Line: A computer program via which we can commit changes to repository.
Branch: If multiple people are working on same project, Branching comes in handy where people can maintain their own version controls in their own repo and we can merge all branches before pushing to repository.
Clone: Copying the repository on your Machine.
Local Repository Taking clone of repository on your machine and working on it, Despite Internet connection is working or not.
Setting Up github for the first time, You simply need to sign up at Github.com and Creating you first repository is shown in other Post
- Git vs. GitHub: Understand that Git is the engine (version control) created by Linus Torvalds, while GitHub is the social platform built around it.
- Snapshot Logic: A "Commit" isn't just a save button; it’s a permanent snapshot of your project at a specific point in time.
- Collaborative Power: Features like Forking and Branching allow multiple people to work on the same project simultaneously without overwriting each other's work.
- Local Freedom: With "Cloning," you can work on your project anywhere, even without an internet connection, thanks to your local repository.