Konstantin gave you a good answer. But I'll put in one from my newbie self.
When you create a new repo, and you use a "git clone" command. That
automatically sets up a remote called "origin" with a URL which is
where you cloned from. E.g.
git clone https://github.com/git/git
and in the git subdirectory, I did a
git remote -v
which resulted in:
origin https://github.com/git/git (fetch)
origin https://github.com/git/git (push)
This was set up for me automagically by the "git clone" command.
Hope this helps some.
On Tue, Jan 15, 2013 at 6:56 AM, Floriano Fauzzi
> Hi Thomas,
> thanks for the answer. I'm sorry, I didnt explain my question clearly. I try
> to clarify it by this scenario:
> "Paul has a repository on GitHub called rep1 with some files. On his pc,
> Paul clones it into the local repo called rep2 and stored, say, in C:\ "
> Now the question is:
> How does git know that the local repo stored in "C:\rep2" is mapped on the
> remote rep1 (so that, when I push any local change I've commited, they are
> sent to the right origin)?
> Is this piece of info stored in a file? I mean, the remote -v command you
> wrote about, how does it retrieves the info it then displays?
> Hope this is clearer now.
> Thanks a lot in advance for your time and help.
> Il giorno martedì 15 gennaio 2013 13:20:31 UTC+1, Thomas Ferris Nicolaisen
> ha scritto:
>> On Tuesday, January 15, 2013 12:37:25 PM UTC+1, Floriano Fauzzi wrote:
>>> I want to know what is the file where, Git portable or Git stand alone
>>> software, store the mapping between the clone repository ( on pc ) and the
>>> web repository.
>>> I need this information because I know that clone repository could have a
>>> different name compared to web repository.
>>> Thanks for the answers.
>> A git repository has zero or more remotes. These are other git
>> repositories that contain more or less the same contents as you have
>> To see which remotes you currently have configured, use:
>> git remote -v
>> To see more details about a given remote, for example one called "origin"
>> (which is the default name for the remote when you create the local repo by
>> cloning it from the remote one), do:
>> git remote show origin