Git is...complicated. This series focuses on breaking git down into commit-sized pieces.
Working Words
The decentralized nature of Git creates some confusion about the different words you might use, so let's try to clear that up.
Repo
Repository, or repo, is the place data is stored. People sometimes will use "project" interchangeably with a repo. The repo usually contains the project history.
When you work with a project on GitHub, there is a repo on the server. When you clone that repo, there is a repo on your computer as well.
A server isn't necessary, though. If you run git init
you create a new repo on your computer. It doesn't exist anywhere else in that moment.
Clone
We usually refer to our copy of a repo as a clone. This helps differentiate between our copy and the server. While there is no actual distinction, we tend to still think in that centralized concept, so most people refer to the server's copy as the repo.
Fork
Forking is the idea that you split from the original repo and have your own copy. Perhaps you want to do something different with the project, or this can be the first step in making a copy so you can contribute in the open-source fork-and-pull model.
This terminology is really about the centralized server-side repositories. Clones are for working with the original server-side repository. Forks are making a copy of that server-side repository.
Remote
A remote is another copy of the repo, usually on a server. When you clone a repo, it will create a default remote of origin pointing back to the source. In many branch-based workflows, you only set up one remote. In a fork-and-pull style, you might set up origin for your personal fork and upstream for the repository you forked from.
Summary
Does this line up with how you use these words? Let me know!
git commit -am 'Basic Terminology'
git push
Top comments (0)