Try this :
administrator@pramod-desktop:/home/user153/workspace/repo02$ git pull ../../remote_repository.git
Here /home/user153/workspace/repo02 is the working folder where .git is resided in your case.
Question
I created a git
environment locally.One system behaves like the server
and I created another system as gituser(client)
.My server repository is a bare repository.I used this $ git clone --bare . ../../remote_repository.git
for creating this bare repository.Client made changes and PUSH
updated file to remote_repository.But the Server need to view and make update.Thats why I am trying to PULL
the file.But I am receiving the below response.Other commands like git status
etc are also giving the same response.Since I am a newbie I am very much confused.
Received Response
fatal: Not a git repository (or any of the parent directories): .git
I tried with the below command.I am using ubuntu
.
administrator@pramod-desktop:/$ git pull ../../remote_repository.git
Command Explanation
My bare repository path in server is /home/user153/remote_repository.git
../../remote_repository.git:`Path` to my remote_repository.git(git folder)
Anyone please help.
Solution 2
Try this :
administrator@pramod-desktop:/home/user153/workspace/repo02$ git pull ../../remote_repository.git
Here /home/user153/workspace/repo02 is the working folder where .git is resided in your case.
OTHER TIPS
Pull is an operation that needs two arguments, the repository to pull from and the repository to merge the pulled changes to. The target repository is found from current directory or from special option. When you write:
administrator@pramod-desktop:/$ git pull ../../remote_repository.git
^
Current working directory appears to be /
. That definitely isn't a git repository. The synopsis of git pull
is:
target-repository$
git
pull
name-of-source-repository
or
anywhere$
git
--git-dir=
target-repository pull
name-of-source-repository
The target-repository must be a current working directory or must be given using the --git-dir
option, but you are trying to pass it as argument.
The name-of-source-repository can be either URL or name of remote configured in .git/config
(in bare repository that's just config
).
If you want to check the file out on the server (indeed rather common operation), you should create another, non-bare clone. Than you need to call the git pull
from that clone.