Introduction to Git and GitHub
What is git and why use it?
Git is a version control tool. Version control is an efficient way of tracking changes in source code and projects. It allows for efficient and effortless management of maintaining projects. Most of the products undergo a lot of revision and updates, including division of the project into multiple teams based on their specialties. Version control makes it effortless to track each version and change in the source code, hence, making the work flow clear and traceable while reducing redundancy and errors.
Git allows you to track the entire history for a given code base. It allows you to compare the tiny changes in source code and choose what to take into another environment. Also, It allows you to work with efficiently manage non-linear development of a project (branching and merging). This and so much more!
Git simplifies every task of exploring the differences between these changes as well as working with collaborators or on a team. If used properly, every small change in a project can be annotated. This makes the maintenance of the projects a lot easier.
Github
Github is a git repository hosting service, but it also adds its own set of rich features. While git is simply a command line tool, Github provides a web-based graphical interface. It can be seen as Facebook for programmers where every one can share what they are working on and choose to work together with others. Other users in Github can view these hosted projects and peruse their code and make suggestions. It allows anyone to easily inspect a code base and its entire history, therefore making it the suitable platform for the open source projects.
Github is built for collaboration. Github makes this fairly easy with fork, pull request and merge. If you want to contribute to an open source project, you simply fork the project and modify it under your own account. After you make your changes, you send a pull request to the original owner. The owners then review your changes and merge them into the original project, if these changes are beneficial for the project.
Most of the open source projects are developed this way. A great example is node.js. A great way to start is go to Github and search for different projects, for instance, Microsoft’s calculator. Take a look around. Click the commits tab and click on a commit to see what changes were made.