Reputation:
I am trying to upload a folder called 'repo' to a remote repository on a server.
I wrote on the server side:
mkdir -p ~/git/
git init --bare ~/git/repo.git
and on the local side:
mkdir repo
cd repo
git init
git add .
git commit -m 'initial commit'
git remote add origin ssh://SERVER/~MYUSER/git/repo.git
git push -u origin master
What I got is the following when commit:
create mode 100644 repo.zip
create mode 100755 repo/clock.h
create mode 100755 repo/conf/ips
create mode 100755 repo/conf/msg
create mode 100755 repo/conf/prt
create mode 100755 repo/conf/tim
create mode 100755 repo/conversions.h
create mode 100755 repo/main.cpp
create mode 100755 repo/message.h
create mode 100755 repo/process.h
create mode 100755 repo/view.h
and the following message after the push:
Counting objects: 15, done.
Compressing objects: 100% (11/11), done.
Writing objects: 100% (15/15), 11.3 KiB, done.
Total 15 (delta 0), reused 0 (delta 0)
To ssh://SERVER/~MYUSER/git/repo.git
* [new branch] master -> master
Branch master set up to track remote branch master from origin.
when I tried I tried to pull using:
git pull repo master
and I got:
warning: no common commits
remote: Counting objects: 15, done.
remote: Compressing objects: 100% (11/11), done.
remote: Total 15 (delta 0), reused 0 (delta 0)
Unpacking objects: 100% (15/15), done.
From repo
* branch master -> FETCH_HEAD
Merge made by the 'recursive' strategy.
repo.zip | Bin 0 -> 6838 bytes
repo/clock.h | 4 +
repo/conf/ips | 2 +
repo/conf/msg | 1 +
repo/conf/prt | 1 +
repo/conf/tim | 1 +
repo/conversions.h | 89 ++++++++++++++++++
repo/main.cpp | 266 +++++++++++++++++++++++++++++++++++++++++++++++++++++
repo/message.h | 51 ++++++++++
repo/process.h | 46 +++++++++
repo/view.h | 68 ++++++++++++++
11 files changed, 529 insertions(+)
create mode 100644 repo.zip
create mode 100755 repo/clock.h
create mode 100755 repo/conf/ips
create mode 100755 repo/conf/msg
create mode 100755 repo/conf/prt
create mode 100755 repo/conf/tim
create mode 100755 repo/conversions.h
create mode 100755 repo/main.cpp
create mode 100755 repo/message.h
create mode 100755 repo/process.h
create mode 100755 repo/view.h
My problem is: Nothing is updated on the server. Does any one has a clue what is going on?
Upvotes: 0
Views: 79
Reputation: 9886
I've just replicated your setup and it seems to be working.
Try doing following from a different place:
git clone ssh://SERVER/~MYUSER/git/repo.git new-repo
cd new-repo
ls -l
now you'll see your files.
I think you may be getting confused or don't understand the difference between a bare repository and the working directory. You won't see any files in the server repository, as it's bare (so everything is in repository files), and there's no file system checked out there (working directory). You only get a working directory when you clone from a repository.
edit: go read some basic tutorials on git working directories
Upvotes: 1