What are Git and GitHub? Should You Learn it?

What are Git and GitHub? Should You Learn it?
Image by Christina Morillo/ Canva

I’m sure in your working life you would have come across a situation that goes something like this: you’re in a team of, say, five people working on a proposal for a new project. The project lead assigns each member a section of the proposal to work on. The final document is to be completed by the end of the week. However, as the week progresses, each member makes changes to their respective sections of the document and saves them on their personal computer without any version control system in place. By the end of the week, the project lead discovers that multiple versions of the proposal are floating around, with different changes and revisions. The project lead must now go through each version, trying to piece together the most recent and accurate version of the proposal, causing delays and confusion among the team. AHHHHHHHHH~~~~~~~~ what a pain!

This situation illustrates the problems that can arise when using a poor version control system in a team environment. Yes, that was me setting the scene to introduce you to Git and GitHub; both are associated with version control.

In this blog, I’m going to cover the following:

  • What are Git and GitHub, including that cat-like cartoon, meow~
  • Should you learn Git and GitHub?
  • Which should you learn first, Git or GitHub?
  • Key Git concepts and terminologies to start with

What are Git and GitHub?

Git is a version control system used to track changes in computer files and coordinate work on those files among multiple people. It is like Microsoft Word’s Track Changes feature but heaps better and more sophisticated. It is primarily used for software development. It allows developers to keep track of changes made to their code, collaborate on code with others, and easily revert to previous versions of the code. That said, some non-developer professionals use Git to manage and share their work. Git is a command-line tool, and it can be installed on a local machine (your computer) or server.

GitHub is a web-based platform that uses Git to track changes. It provides a user-friendly interface for Git. On GitHub you can also find various collaboration and project management tools. It’s also a valuable source to discover open-source code other developers have shared.

People often get Git and GitHub confused, myself included. But now I’m clear on the difference. GitHub is built on top of Git and provides a user-friendly web interface for Git functionality. So you can use Git without GitHub.

If you’ve been to the GitHub website, you’ll see a cat-like mascot! I came across it before I’d even heard of GitHub. The kitty is not really a kitty. It is an octopus with a cat-like face, known as Octocat. It is a well-known cartoon in the tech community. The mascot was designed by graphic a British graphic artist Simon Oxley. The octopus was inspired by the company’s use of Git. The eight arms of the Octocat represent the many ways in which developers can use Git and GitHub to collaborate and contribute to open-source projects. I really like the cartoon. I like it so much that I bought a GitHub hoodie. This is what it looks like:

GitHub Invertocat (a variant of Octocat) Hoodie
GitHub Invertocat (a variant of Octocat) Hoodie

What do you think? Do you like it? GitHub has other merchandise; check out the GitHub Shop, and see if there is anything you like.

Should You Learn Git and GitHub?

Generally, I don’t like telling people whether they should or shouldn’t do something. It’s not my call, and I don’t think you should let anyone tell you what you should or shouldn’t do. Don’t give anyone that power. You can seek other people’s opinions but make sure you decide at the end of the day. You are the best judge of your wants and needs. Making your own decisions and taking responsibility for them will help you grow. You will learn from your experiences and become more resilient and self-reliant, and trust me, you’ll feel more fulfilled that way. With that said, I’ll share my decision and thinking in reaching my choice so that you can consider whether learning Git and GitHub is right for you.

I know I need to learn Git and GitHub, and these are my reasons:

  • Git is a powerful and widely-used version control system: My soul career in the foreseeable future is in the data and tech space. Git and GitHub are very much an industry standard, so proficiency in these tools is a valuable asset for career advancement. Many companies use Git and GitHub for version control and collaboration. I know our Head Offices in US and Germany use Git.
  • GitHub is the largest code hosting platform: GitHub is the most popular platform for hosting and sharing code. Learning it will give me access to a vast ecosystem of open-source code and a community of developers and data professionals who can help me learn and grow.
  • Professional Development: GitHub is a great place to showcase projects and contributions. I can leverage it to make me a more desirable candidate for a job or a freelance/ consulting opportunity.

Which Should You Learn First, Git or GitHub?

What should you learn first if you need and want to learn Git and GitHub? Depending on the source or who you speak to, they may recommend that you learn either Git or GiHub first as a beginner. The reason for pro-Git firsts is that Git is the foundation of version control and the underlying technology that powers GitHub. However, I’m not comfortable using the command-line tool; therefore, I’m pro-GitHub first. I think GitHub user-friendly interface makes it easier to learn about Git. The graphical interface of GitHub allows you to perform many common Git tasks, such as creating and managing repositories, viewing commit history, working with branches etc., without having to memorize Git commands.

Both approaches have their advantages and disadvantages. It depends on your learning style. If you’re a visual learner, starting with GitHub is probably easier. If you prefer to learn the concepts and mechanics first, then beginning with Git might be more suitable. Ultimately, the best approach is the one that works for you and your learning style.

Key Git Concepts and Terminologies to Start With

Here are some key concepts and terminologies to start you off:

  • Repository: A collection of files and their complete revision history. It can be thought of as a project or a folder that contains all the files and folders related to a project. People often refer to it as repo.
  • Commit: A saved point in the revision history of a repository, representing the state of the files at a specific point in time. Each commit includes a unique ID, a message describing the changes, and the author of the changes. So essentially, it’s like “Save”.
  • Branch: A parallel version of a repository, allowing multiple project versions to be developed simultaneously. If you want to experiment with your code and don’t want to disrupt the main trunk, then you can create a branch.
  • Merge: Combining multiple branches, usually to bring changes from one branch to another.
  • Pull request: A request to merge one branch into another, usually used to review and collaborate on code changes before merging.
  • Fork: A copy of a repository, usually used to make changes to an existing project without affecting the original project.
  • Clone: A local copy of a repository, typically used to work on the code locally and push changes back to the remote repository.

Check out Git or Github if you want to get started now. GitHub provides tutorials. Here are a couple of free resources that you can also refer to:

That’s it from me for now. So, do you think you need to learn Git or GitHub?