Initializing a Git repository is the same as creating a Microsoft Word document on your local computer:
Cloning a Git repository is the same as downloading a Microsoft Word document from the cloud (OneDrive) to your local computer:
git clone <repository>
Creating a Git branch is the same as duplicating a Microsoft Word document:
git branch <branchname>
Making a Git commit is the same as saving a new version of your Microsoft Word document:
In Git, there’s an extra step where you need to add your changes before you can commit. Git also requires a commit message so that your changes are annotated if you ever need to view or rollback to a previous change.
Reverting a Git commit is the same as restoring a previously saved version of your Microsoft Word document:
Pushing your local repository contents to a remote repository is the same as syncing (uploading) your local Microsoft Word Document to the cloud (OneDrive):
Pulling from a remote repository and integrating the contents to your local repository is the same as syncing (downloading) your local Microsoft Word Document from the cloud (OneDrive):
Merging changes from one branch to another is the same as consolidating two different Microsoft Word documents into one:
When two developers work on the same repository, they both download a copy of the codebase to their local computer. They commit their changes, push their code to GitHub, open a pull request (PR), and merge it into the default branch.
Describing this using Microsoft Word, two editors download the same document from OneDrive, make their changes, and upload their versions to the cloud. Then the documents are reviewed and combined into a single document.
Why does Git have so many steps? Because Git promotes distributed workflows. This means that multiple developers can work on the same codebase—whether they’re online or offline. Imagine there are 10 editors who have to make offline edits. Now imagine there are 100 editors working on the same document. Git solves the problem of scalable collaboration.
|Duplicate on OneDrive
|Download from OneDrive
|Upload (Sync to Cloud)
|Download (Sync from Cloud)
|Restore Previous Version