更新 - 与git企业已知的问题。使用unfuddle和subtree merge现在作品导入本地git回购远程服务器回购
我一直在使用Git在本地机器上进行本地开发。它从未被推到远程回购。
我刚刚注册了一个企业git帐户。我现在想将我的本地仓库导入到新创建的远程仓库仓库中,并维护历史记录。
试图按照答案here,虽然收到
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 to
remote: error: 'ignore' or 'warn' in the remote repository to allow pushing into
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 some
remote: error: other way.
remote: error:
remote: error: To squelch this message and still keep the default behaviour, set
remote: error: 'receive.denyCurrentBranch' configuration variable to 'refuse'.
所以然后试图
git clone repourl/project.git
cd project
git remote add other /tmp/myproject
git checkout master
git commit
git push
当我做git的承诺收到
On branch master
nothing to commit (working directory clean)
做混帐推收到
Everything up-to-date
虽然如果我做“ls”我会看到我所有的文件。 如果我做“git log”,我会看到我的版本历史记录。
你如何推动你的本地回购?什么命令给你错误信息? – Andy