git制作,开发环境

时间:2015-09-18 18:08:34

标签: python git version

我在网络驱动器上有一个python文件项目叫做#34;开发"。

我为开发新功能创建分支,然后在完成后合并回开发。其他人将来也会这样做。

我想推动"发展"进入另一个名为" Production"的文件夹。而对于我的生活无法弄清楚如何做到这一点。

请建议吗?怎么做?

感谢。

尝试时出现此错误。

Pushing to G:\03 GIS RESOURCES\05 GIS PROGRAMMING\Production
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 G:\03 GIS RESOURCES\05 GIS PROGRAMMING\Production
 ! [remote rejected] master -> master (branch is currently checked out)
error: failed to push some refs to 'G:\03 GIS RESOURCES\05 GIS PROGRAMMING\Production'

1 个答案:

答案 0 :(得分:0)

选项A

您可以将开发项目克隆到另一个文件夹中。

梗概:

git clone <repository> <directory>

示例:

git clone <path/to/Development> Production

选项B

将文件夹Development(包括.git文件夹)的内容复制到文件夹Production。