0

I have created a remote git repository on a remote server in this place: /home/mysite/public_html/git/mysite.git and set /home/mysite/public_html as a remote working directory specified.

On my local machine I successfully cloned the repository with git clone http://user@mysite.com/git/mysite.git and pushed a test file in it:

git add test.txt
git commit -am "test update"
git push origin master

The operation shows no errors - it seems to be updating local repository, however, I cannot find any files in the remote repository and neither in the working directory.

Another thing - if I delete my local repository and clone it again from the server, the text file comes along, meaning it is stored somewhere in the remote repository, just not where I need it. What could be wrong with my setup?

Deez
  • 797
  • 2
  • 6
  • 26

1 Answers1

1

You might have created you remote repository with this command :

git init --bare

If that is the case, this repo is not an ordinary repo, as you can't work in it. But it will work perfectly as a remote repo, and you can clone, pull, fetch etc...

If you didn't use the --bare option, your remote repo work as all other repos, you have to do a pull to get your updates :

git pull
cexbrayat
  • 14,952
  • 3
  • 23
  • 22