Q) What does remote mean? When cloning a repository located at a central location, aren't we creating its remote version?
Answer:
Remote repositories are versions of your project that are hosted on
the Internet or network somewhere.
So, your point of reference is the machine on which you are running your commands (your laptop) and ergo the central location where the repository is hosted for collaborators is the "remote".
Q) When I execute the command
$ git remote
I get origin. What does this mean?
Answer:
(git remote command) lists the shortnames of each remote handle you’ve
specified. If you’ve cloned your repository, you should at least see
origin – that is the default name Git gives to the server you cloned
from.
Specifying git remote -v
will give you the shortname and corresponding URL of the "remote" (AKA the repository).
Q) When I execute
$ git branch -r
I get origin/master. Now what is this?
Answer:
origin is the shortname created by Git for you to refer to your remote repository; master being the default branch pointing to the last commit
Therefore, "git branch -r" will list the remote (origin) branch (master).
References:
- Git Basics - Working with Remotes
- Git Branching - Branches in a Nutshell