Reputation: 1375
I have been JUST using git for some time in my organization. Suddenly the knowledge to understand git bit me.
So in the process, I understood that git can be standalone without requiring any repositories like Github or Gitlab, and solely be dependent on my single local machine.
My question is if the above is true, then what is the use of git push, git fetch, git pull
.
If you argue that these commands were introduced to manage the online repositories, then how were initial developers used to collaborate without these online repositories, as Github was released around 2008.
Upvotes: 0
Views: 44
Reputation: 17288
Git can use four distinct protocols to transfer data: Local, HTTP, Secure Shell (SSH) and Git. More info at Git Protocols
For remote access to a repository any internet accessible server with can be setup with HTTP, SSH or Git access.
The popular git portals such as github just provide an easy to use interface for git work.
Upvotes: 1
Reputation: 2918
These commands are only used with a remote location.
In general git
is a tool that needs a single location of the source code, at least at some point.
But you could still run your own server if you desire: how-run-your-own-git-server
I think for small companies or personal stuff it's way easier to let them get setup and maintained.
Not to forget about the wole open source community.
Upvotes: 1