Table of contents
No headings in the article.
Before deep dive into GitHub, there are some fundamental concepts and tools to be understood:
Version Control System(VCS): Consider you are working on a portfolio website project. In that project, you are changing the background color of the portfolio website by modifying the CSS code. Generally, this VCS constantly takes a copy of this project code (snapshots)in all stages the project has been modified. If you don't like this current background color, you can bring the previous background by replacing the previous code in the project. There are two types: A Centralized Control System and A Distributed Control System
1) Centralized Version Control System (CVCS): Imagine you are creating a portfolio website project with multiple people working on it. All team members are connected to a central server to get the latest copy of the code (snapshots) and to share their changes with others. The problem with this version control is if the central server goes offline, you cannot collaborate with your team members. You have to wait until the server is back online to get a copy of the project. Examples include Subversion and Microsoft Team Foundation server.
2)Distributed Control System (DVCS): Here, we don't have these problems because every team member has a copy of the project with its history. We can save the code (snapshots) of our project locally on our machines. If the central server is offline, we can still synchronize our work directly with others. Examples include Git and Mercurial.
What is Git and what is the difference between Git and GitHub:
Git is a distributed version control system (DVCS) that allows multiple developers to work on a project simultaneously, each having a complete copy of the project repository on their local machine, enabling offline work and later synchronization of changes.
The difference between Git and GitHub is as follows:
Git:
Type: Version Control System (VCS)
Function: Manages and tracks changes in source code during software development.
Usage: Used locally on a developer's machine to manage project versions.
Features: Branching, merging, committing changes, and maintaining a history of changes.
Installation: Requires installation on a local machine.
GitHub:
Type: Web-based platform
Function: Hosts Git repositories and provides a collaborative environment for developers.
Usage: Used to store, share, and collaborate on Git repositories over the internet.
Features: Pull requests, issue tracking, project management tools, and social coding features.
Access: Accessible via a web browser and integrates with Git.
In summary, Git is the tool that developers use to manage their code, while GitHub is a platform that facilitates collaboration and sharing of Git repositories.
Repositories: They are simply places where code or files are stored.
Conclusion:
Understanding Git and GitHub is crucial for managing code changes locally and collaborating on repositories, enhancing development workflow and teamwork; in the next post, we will cover installing Git and setting up GitHub, so feel free to comment with any doubts.