DEV Community

Cover image for Introduction to git and GitHub
Nočnica Mellifera for RudderStack

Posted on

Introduction to git and GitHub

a guest post from Opemipo Disu

GitHub is a platform or a community for developers and a provider of Internet hosting for software development and version control using Git for repositories. It's the most popular tool for developers that is built on top of Git to give teams another level of project organization, which includes issue tracking, code reviewing, and much more.

Git is an open-source version control system that helps to track changes. It makes collaboration faster and tracks the changes you make to files, so you have a record of what has been done.

GitHub is the main stuff used in open-sourcing, working on projects, and doing some sort of code collaboration. GitHub is the most popular developer platform and the most used tool for developers. It's more accessible to use than any other related platform and it's super fast!

On the other hand, Git is just an Open Source Distributed Version Control System. It lets developers see the timeline of their changes, it also gives the revision history of every updated file - it's been a sort of backup for developers anytime things get wrong. Its goals include speed, data integrity, and support for distributed, non-linear workflows.

It's quite obvious that Git and GitHub have a very strong relationship, this relationship. If you have open-source projects that use Git, then GitHub is designed to help you better manage them.

Getting Started With GitHub

  • Create a GitHub account:

Alt Text

Creating a GitHub account is very easy, all you need is just to provide all the required credentials for creating your account. It's awesome stuff to try, you can get into GitHub as it is the most used tools by Developers. After doing this, verify your account.

  • Set Up Git: Git is used on a CLI, you'll need to download, install, and configure Git on your computer. You can see the GitHub CLI Documentation for this. This is a very good step to take after creating your GitHub account.

  • Create a repository: This is the fun stuff about everything as creating a repository is the stuff developers do to work. Without a repository, you can work on any project on GitHub.

  • Fork a repository: Forking a repository is just like copying it. It allows you to try fun stuff with what you've worked on but it doesn't affect the main repo you forked it from. After forking a repo, you can make a fix and then submit a pull request to the project owner.

  • Create a pull request: Creating a pull request is very easy, this allows you to collaborate on a project with other members who are working on the project. For making a pull request, you have to Click the Compare & pull request button you find in a repository.

Alt Text

When you click the button, it heads you over to something like this:

Alt Text

You can make any change you want if you've seen this.

Few terminologies used in Git

  • Branch: A branch is a pattern of commits or a pointer to a commit.

  • Commit: Commit is a collection of changes, it simply means the contributions you've made.

  • Clone: The copy of a repo from GitHub.

  • Merge: To Merge is to join two or more git histories together.

  • The Git index: This is a staging area between the working directory and repository.

You can find more Git terminologies here

Here are some of the articles that can help you with using Git or even GitHub:

Thanks so much for taking out your time to read this article. It is basically for developers who want to dive into Git or GitHub. I hope this helps someone out there!

Top comments (0)