I am learning git using a tutorial, and stumbled over the following problem:

Starting with my own repository, I had created a bare repository, and 
assigned a name to it, like this:

# I already have a repository my_repo1
cd ~/my_repo1

git clone --bare . ~/github/master.git
git remote add master ~/github/master.git

Now I created another repository:

cd ~/my_repo2
git clone ~/github/master.git .

I can now work with the my repositories by pushing and pulling the files. 
Everything fine so far. However I noticed the following:

This works:

cd ~/my_repo1
git pull ~/github/master.git

But this does not:

git pull master

The error message I receive is: "You asked to pull from the remote 
'master', but did not specify a branch."

I thought that my assigning the name "master" to the remote repository, I 
can just use this name instead of the long "real" name, but obviously this 
is not true. It seems that the command "git remote add" not 'just' adds an 
alternative name to the repository, but has some additional semantics.

Could someone please enlighten be here?

You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to