문제

I created a bare repo on my VPS

The repo's file folder is "~/repo" , I used "git init --bare" at "~/rpeo/.git" and then did nothing

Then I cloned it and pushed something I got this result :

 $ git push origin master
Counting objects: 19, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (14/14), done.
Writing objects: 100% (19/19), 797.99 KiB, done.
Total 19 (delta 1), reused 0 (delta 0)
To ssh://XXXX@XXXX.com:3344/~/ROOT
 * [new branch]      master -> master

I can also see the log on the server side and use "git pull" to get these files

the log :

commit 833ad06648f999f51d54c9e082a136270cbd3686
  Author: XXXX <XXXX@gmail.com>
  Date:   Mon Mar 10 14:45:49 2014 +0800

    init web

but ~/repo is still empty

Please help me , thank u very much!

도움이 되었습니까?

해결책

~/repo is still empty

What do you mean by this? If you mean there is no source code inside it, then yes, a bare repository will not contain working copies of your source files.

The repo's file folder is "~/repo" , I used "git init --bare" at "~/repo/.git" and then did nothing

If you did this, then strictly, ~/repo is not the bare repository but ~/repo/.git. By convention, bare repository directories end in .git, so you'd better do

git init --bare ~/repo.git

instead, then ~/repo.git is your bare repository.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top