How Git interacts with GitHub – Git commands and GitHub workflows
Suppose you’ve just joined a team of developers to work on an exciting new project hosted on GitHub. You’re eager to dive in, but first, let’s understand how Git commands on your local machine interact with GitHub, making collaboration seamless and efficient.
Git clone – cloning your first GitHub repository (the welcome kit)
When you join a project, the first thing you do is use the git clone
command to copy the project from GitHub to your local machine. Think of it as receiving a welcome kit on your first day at a new job. This kit contains all the existing work done on the project:
Figure 2.1 – The GitHub welcome kit
So, you would finally like to clone the GitHub repository to your local computer? OK, let’s see how you can accomplish that:
- Navigate to the repository on GitHub you created previously,
MyFirstRepo
, and click on...