search

Home  >  Q&A  >  body text

git远程仓库中看不到本地push的文件?

在局域网的服务器上面使用git --bare init demo.git建立了空仓库,本地clone后添加文件push到服务器上面显示成功,但是登录服务器的demo.git目录中看不到添加的文件,其他人pull可以看到我push的文件?

大家讲道理大家讲道理2772 days ago1051

reply all(2)I'll reply

  • 曾经蜡笔没有小新

    曾经蜡笔没有小新2017-04-28 09:08:34

    The bare warehouse only stores history and meta-information (detailed format) and does not maintain a working directory.

    You can add the --workspace parameter when running git commands (such as checkout) to specify the working directory.

    reply
    0
  • PHP中文网

    PHP中文网2017-04-28 09:08:34

    Bare warehouse does not store files

    If you need to view the file on the server, do not add it when creating the warehouse on the server--bare

    git init demo.git
    

    reply
    0
  • Cancelreply