开发者

Problem to use git push to remote server

Hey Guys I'm new to command line I want make the local changes to push to the remote server. I follow this screencast.

everything seems Ok, but when I check the remote server, it's still a bare git folder.

Here's the command I made:

Agro:first Zhulin$ git remote add origin root@m开发者_Go百科arkson.hk:/export/git/ProjectServer
Agro:first Zhulin$ git push origin master
root@markson.hk's password: 
Counting objects: 63, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (48/48), done.
Writing objects: 100% (63/63), 86.09 KiB, done.
Total 63 (delta 2), reused 0 (delta 0)
To root@markson.hk:/export/git/ProjectServer
 * [new branch]      master -> master

root@makserver:/export# cd git
root@makserver:/export/git# ls
ProjectServer
root@makserver:/export/git# cd ProjectServer/
root@makserver:/export/git/ProjectServer# ls
HEAD  branches  config  description  hooks  info  objects  refs
root@makserver:/export/git/ProjectServer# 


You are pushing to a bare repository. After a push, the repository will be updated with the latest pushed contents. However, for the bare repository to be useful (to be worked on), it has to be cloned.

In the remote server:

$ git clone /path/to/ProjectServer


When you use git with a central repository (e.g the authoritative version of the truth) the central repository is bare, it doesn't have a workspace. This prevents people from creating changes in the actual central repo, to do that they will have to clone the repo first make their changes, commit them and then push them to the central repo.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜