Git init --bare - Not Working on working tree

前端 未结 2 866
暗喜
暗喜 2021-01-27 04:23

I am following the examples here http://wiki.dreamhost.com/Git

Basically I want to create a git repo i can push to on a server from my desktop... On host:



        
2条回答
  •  长情又很酷
    2021-01-27 04:47

    git init --bare creates a "bare" repository - one that does not have a working directory associated with it. What you are seeing is what is expected. If you want a separate repository that has a checked out working directory associated with it, don't use the --bare option, but note that doing so has additional implications, because git push acts differently when the remote is not a bare repository, in order to protect you from losing any unstaged/uncommitted changes you may have in the remote.

提交回复
热议问题