What is a Git Remote Repository?

You push up to a remote repository but why is it different?

Image

By default Git is com­plete­ly local to your com­put­er. You can option­al­ly have remote copies of the repos­i­to­ry (either on a cen­tral serv­er or ser­vice — like Github — or on a co-work­ers computer).

To get your copy of the repos­i­to­ry up to a remote serv­er you use the com­mand git-push. If you want to retrieve oth­ers’ changes to the repos­i­to­ry you use git-pull.

A Remote Repos­i­to­ry in Git is a spe­cial type of repos­i­to­ry in that it doesn’t have a Work­ing Tree. This is dif­fer­ent than your local repos­i­to­ry, which has your project files and then a hid­den .git directory.

You can host your own Git remote repos­i­to­ry or use one the pop­u­lar online ser­vices, like Github, Git­lab, or Bit­buck­et.