我有一个远程Web服务器,我可以完全访问它(ssh、git等)。我希望能够编辑我的计算机上的文件并将它们推送到远程服务器。当我使用裸存储库时,它不会更改文件,但当我使用非裸存储库时,它会发出以下消息:
remote: error: refusing to update checked out branch: refs/heads/master
remote: error: By default, updating the current branch in a non-bare repository
remote: error: is denied, because it will make the index and work tree inconsistent
remote: error: with what you pushed, and will require 'git reset --hard' to match
remote: error: the work tree to HEAD.
remote: error:
remote: error: You can set 'receive.denyCurrentBranch' configuration variable t
remote: error: 'ignore' or 'warn' in the remote repository to allow pushing int
remote: error: its current branch; however, this is not recommended unless you
remote: error: arranged to update its work tree to match what you pushed in som
remote: error: other way.
remote: error:
remote: error: To squelch this message and still keep the default behaviour, se
remote: error: 'receive.denyCurrentBranch' configuration variable to 'refuse'.
有没有办法在我的笔记本电脑和远程服务器上同时获得工作副本?
谢谢