You might have heard the term Git and GitHub if your domain is web development . Even if your domain is not web development but is a tech based you still catch up with the words quite frequently. In this blog I'll explain these concepts and explain how these two words play a vital role in modern software development and how you can become friendly with these software. So, lets get started...
Git
Git is a distributed version control system used for tracking changes in source code during software development. In simple words, git is like a time machine for your software code , it helps you keep track of all the changes you make to your code over time and also helps developers to collaborate effectively on the project.
Imagine you are writing a story on your computer . Every time you make a change to your story ,like writing a new paragraph or fixing a typo , Git takes a snapshot of your work. It remembers how your story looked like at each moment in time.
Why Git?
Backup : Git is like a backup system for your work. If something goes wrong with your files, you can always go back to your previous version.
Collaboration : If you're working with others on a project, Git helps everyone works on different parts without messing up each other's work. It keeps everything organized.
Tracking Changes : It keeps the record of all the changes you make to your file. This is helpful because you can see what's been done, when and by whom.
Experimentation : Git allows you to try out new ideas without worrying about messing up your main project. If something doesn't work , you can easily go back to how things were before.
So, Git is like a super helpful tool that keeps track of changes to your code, helps you collaborate with others, and makes it easy to undo mistakes. It's an essential tool for anyone working on software projects.
Key Concepts:
Repositories(Repo) : Think of it as a folder where Git keeps all the files and their history for your project.
Commit : It's like taking a snapshot of your project at a certain point in time. You're saying, "Hey Git, remember how everything looks right now."
Branch : Imagine your project as a tree. A branch is like a new branch growing out of the main trunk. You can work on new features or fixes without affecting the main part of your project.
Merge : When you're done working on a branch, you can merge it back into the main part of your project. It's like bringing your new branch back into the main tree trunk.
Pull Request : If you're working with others, a pull request is like asking them to check out your changes before you merge them into the main project.
Remote : This is like a backup of your project stored on a server. It allows you to collaborate with others and keep your project safe in case something happens to your local copy.
GitHub
GitHub is a web- based hosting service for Git repos. It provides a user friendly interface to manage Git repositories and offers additional collaboration features.
Features :
Remote Repository Hosting : GitHub allows you to store your Git repos in the cloud , making them accessible from anywhere.
Collaboration : GitHub makes it easy for multiple people to work together on a project. You can see what changes others have made, suggest improvements, and work on different parts of the project at the same time.
Version Control : GitHub tracks changes to your code over time. It stores every version of your project so you can always go back to an earlier version if needed.
Issues : You can use GitHub to track bugs, feature requests, and other tasks with issues. You can assign issues to people, label them, and organize them into milestones to keep track of progress.
Pull Request : When you want to contribute to a project, you can create a pull request. This is like asking the project's owner to review and approve your changes before they are merged into the main project.
Community : GitHub is a community of developers. You can follow projects you're interested in, star repositories to show your appreciation, and contribute to open-source projects.
Conclusion
In conclusion , Git and GitHub are very powerful tools and thus make it easier for developers to work together, manage projects, and build software efficiently.