[英]git workflow model & branching
我有这个有趣的链接http://nvie.com/posts/a-successful-git-branching-model/因此,我对此有疑问:
如何初始化“原始”仓库(作为裸机)或工作分支?
您何时进行最终整合? 如果来源是裸仓库,那么我需要在本地分支机构进行处理,然后将其推送到公共仓库(裸仓库)?
最好的问候,彼得
如果打算将其用作服务器,则应为Bare。 因此,您可以从那里推送和拉取更改和分支。
如果不是裸露的,您会收到类似这样的消息,解释为什么它应该裸露:
Counting objects: 3, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (2/2), done.
Writing objects: 100% (2/2), 239 bytes, done.
Total 2 (delta 0), reused 0 (delta 0)
Unpacking objects: 100% (2/2), 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 /Users/flores/Code/git-test
! [remote rejected] master -> master (branch is currently checked out)
error: failed to push some refs to '/Users/flores/Code/git-test'
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.