我正在试图达到什么---作为git存储库和工作副本的本地目录
我对git知之甚少并试图学习它。我的服务器中没有安装git。
因此,我试图在我的系统中创建一个文件夹(Git Repos文件夹),该文件夹将充当存储库的目录。 (像GitHub中创建的存储库)和另一个文件夹(Git克隆文件夹),我可以在其中克隆回购并对其进行处理(如本地克隆的github存储库)。
我希望能够在的Git回购文件夹承诺,并从任何存储库中的Git克隆推夹到相应的存储库。
我曾尝试 -
我创建了一个名为praveenpuglia.com回购内部的Git回购文件夹跑git init
使它一个Git仓库。
接下来,我克隆内的Git克隆回购为praveenpuglia.com文件夹使用git clone D:/Git Repos Folder/praveenpuglia.com
我把自述文件,上演并提交它。
当我试图推动修改到主,我得到这些错误
Pushing to D:/Git Repos Folder/praveenpuglia.com
remote: error: refusing to update checked out branch: refs/heads/master[K
remote: error: By default, updating the current branch in a non-bare repository[K
remote: error: is denied, because it will make the index and work tree inconsistent[K
remote: error: with what you pushed, and will require 'git reset --hard' to match[K
remote: error: the work tree to HEAD.[K
remote: error: [K
remote: error: You can set 'receive.denyCurrentBranch' configuration variable to[K
remote: error: 'ignore' or 'warn' in the remote repository to allow pushing into[K
remote: error: its current branch; however, this is not recommended unless you[K
remote: error: arranged to update its work tree to match what you pushed in some[K
remote: error: other way.[K
remote: error: [K
remote: error: To squelch this message and still keep the default behaviour, set[K
remote: error: 'receive.denyCurrentBranch' configuration variable to 'refuse'.[K
To D:/Git Repos Folder/praveenpuglia.com
! [remote rejected] master -> master (branch is currently checked out)
error: failed to push some refs to D:/Git Repos Folder/praveenpuglia.com'
什么我做错了,我该如何设置?我在这里尝试了几个可用的答案,但无法理解。
阅读这本书,它会帮助:) http://git-scm.com/book – user376507