DEV Community

Cover image for Understanding Git Remote
Adil Shahzad
Adil Shahzad

Posted on

Understanding Git Remote

Git remote

Previously, we have learned about the advanced concepts of Git, and we are familiar with most of the ideas, such as the branches, merging which are very important when it comes to Advance GitHub. You will now be introduced to typical teamwork workflow and using remote repositories correctly.

What are remote repositories

A remote repository is a git repository hosted on the internet or another network.

Why work on remote?

From the start, we have been working on the local repository. Git is a distributed version control system, which means that the repositories are not stored in a single server. However, each client has its local repository with its commits and history in many repositories. These commits can be easily shared, and files can also be edited. This is how Git can easily manage teamwork locally. As teamwork is more based on the commit history, we can quickly get an idea about the project’s modifications through commits logs. So, where does Git remote play its role? For example, one of the developers from the team needed to access the commits. However, the person who has committed in the local repository is not available, so how the developer can access the project commits, through which the developer works, might slow down. This is where git remote helps us; through remote repositories, we can easily host our code on the remote server. Everyone who has access to the team’s repository can quickly push or pull commits through the remote server. Even if you are working individually on a project, adding the remote repository to your local repository will learn how to add it to your local repository. The way you have a backup of your project history and the help of the remote repository, you can access and modify your project anywhere.

Git remote platforms

GitHub, GitLab, and Bitbucket are the most popular service code hosting services on the internet. They all have different pricing tiers and features; we will explore GitHub in this course, so let us get started with GitHub.

What is GitHub?

GitHub is a web-based git or version control repository and internet hosting service. From Open source to business, you can easily host code, manage projects, and build software alongside 50 millions developers around the globe. GitHub also offers distributed version control and source code management (SCM) functionality of Git and its features like GitHub Actions.

GitHub and Open source

GitHub is a platform for the largest Open Source community in the world. With GitHub, you can contribute to the projects you have expertise in. For example, I have expertise in python, so I will find python based projects on GitHub to contribute by fixing bugs or adding new features to the project. A GitHub workflow for open source contributions needs to be followed; we will discuss it more in the GitHub workflow lesson. For GitHub workflow, you need to follow some setups. Firstly, we need to clone it to contribute to a project, so this process is called forking. You can make your code changes on the copy project, and when you are done with your changes, submit a pull request to the maintainer of the code. The maintainer will review the code, and when the maintainer is satisfied with the changes, the maintainer will merge the changes to the default branch. Open source projects are limited to the code; they need docs, translators, community managers, maintainers, and so much more. We will discuss GitHub more and its feature in the next lesson. Let us get started on GitHub by creating a GitHub account.

Summary

Working on local repositories is fun, but sometimes you need to work remotely on a project with teammates; whenever you need to host your project online on the remote repositories. We also discuss GitHub and Open source. In upcoming lessons, we will explore more about GitHub features. If you do not have an account on GitHub, let us create a GitHub account, and if you are a student or an academic teacher, then a special surprise for you in the next lesson.

If you have any question, please feel free to connect with me on LinkedIn.

Latest comments (0)