To back up your Git repo on the cloud, you’ll need to use a remote repository service, such as GitHub.
A repo you have on your computer is called a local repo. A remote repo is a repo hosted on a remote computer and allows remote access. Some use cases for remote repositories:
- as a back of your local repo
- as an intermediary repo to work on the same files from multiple computers
- for sharing the revision history of a codebase among team members of a multi-person project
It is possible to set up a Git remote repo on your own server, but an easier option is to use a remote repo hosting service such as GitHub.