0

我花了很多时间使用 Darcs,但现在我正在使用一个将 git 强加给我的工具。我想弄清楚如何将我的旧工作流程与 git 一起使用。似乎它应该翻译成 git,但是当我尝试它时遇到一个奇怪的错误。

所以假设我有一个包含项目仓库的“项目”目录。假设我必须在项目中添加功能“foo”。所以我可能会这样做:

darcs clone project-repo project.foo
cd project.foo

然后进行更改并“提交”到历史记录:

darcs record

最后将历史合并到主仓库中:

darcs push

现在我可以丢弃 project.foo,或者保留它,如果它看起来合理的话。

好的,所以我试了一下,在一个使用厨师的项目中:

git clone chef chef.foo
<make changes>
git commit -m "changes message"
git push

但我遇到了一个错误。

Counting objects: 23, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (16/16), done.
Writing objects: 100% (17/17), 2.29 KiB, done.
Total 17 (delta 9), reused 0 (delta 0)
Unpacking objects: 100% (17/17), done.
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'.
To /home/foo/dev/chef
! [remote rejected] master -> master (branch is currently checked out)

好的,我想这个错误并不是特别奇怪,但为什么它不能“正常工作”?你知道,我能做些什么来将它用作分布式 vcs?

4

1 回答 1

0

好的,我刚试过这个:

cd ..
cd project-repo
git pull ../project.foo

它成功地提取了补丁。如果我能把东西推到回购中应该会很好,不过......

于 2013-11-04T01:53:15.880 回答