Introduction to git and github

Recommended

Introduction to Git

Welcome to this Git and GitHub basics training guide! In this Git crash course, you will learn the basics of Git so you can use Git to track your code changes and collaborate with other members of your team or open source maintainers.

Whether you are a newcomer to programming, or an experienced one, you have to know how to use Git. Most of the projects that a small or big group of developers work on are done through GitHub or GitLab.

It makes working with other developers so much more exciting and enjoyable, just by creating a new branch, adding all your brilliant ideas to the code that can help the project, committing it, and then pushing it to GitHub or GitLab. Then after the PR(pull request) has been opened, reviewed, and then merged, you can get back to your code and continue adding more awesome stuff. After pulling the changes from the main/master branch, of course.

If what you just read doesn’t make any sense to you, don’t worry. Everything will be explained in this eBook!

This eBook will show you the basics of how to start using Git and try to help you get more comfortable with it.

It does look a bit scary in the beginning, but don’t worry. It’s not as frightening as it seems, and hopefully, after reading this eBook, you can get a bit more comfortable with
Git.

Learning Git is essential for every programmer. Even some of the biggest companies use GitHub for their projects. Remember that the more you use it, the more you’re going to get used to it.

Git is without a doubt the most popular open-source version control system for tracking changes in source code out there.

The original author of git is Linus Torvalds, who is also the creator of Linux.

Git is designed to help programmers coordinating work with each other. Its goals include speed, data integrity, and support for distributed workflows.

Version Control

Version control, also called Source control, allows you to track and manage all of the changes to your code.

Why Use Version Control?

  • Multiple people could work on the same project simultaneously.
  • Serves simultaneously as a repository, project narrative, communication medium, and team and product management tool.
  • Records all changes in a log
  • Allows team members to work concurrently and provides the facility to merge that work back together.
  • Traces each change made to the software.
  • Data is transitory and can be lost easily.

What is Version Control System?

Also known as a source code manager (SCM) or a revision control system (RCS), it is a system that keeps track of changes to a file or set of files and in case of any problems, lets you go back in history, comparing changes over time, and easily revert to a working state of your source code. SVN, Mercurial, and the massively popular Git are popular version control systems for developers. All of these are free and open-source.

With distributed version control systems like Git, you would have your source code stored on a remote repository like GitHub and also a local repository stored on your computer.

You will learn more about remote and local repositories in the next few chapters. Still, one of the main points for the moment is that your source code would be stored on a remote repository, so in case that something goes wrong with your laptop, you would not lose all of your changes, but they will be safely stored on GitHub

Attribution

Shriram Krishnamurthi (2017), Introduction to git and github (Light), URL: https://github.com/bobbyiliev/introduction-to-git-and-github-ebook

This work is licensed under the MIT License:
( https://github.com/bobbyiliev/introduction-to-git-and-github-ebook/blob/main/LICENSE
).

VP Flipbook Maker

Display your work as a digital flipbook with Visual Paradigm Online Flipbook Maker! It is a professional tool for you to convert your work. You can also choose to create from scratch and also customize the templates. Try it now!