繁体   English   中英

git生产,开发环境

[英]git production , development environment

我在名为“开发”的网络驱动器上有一个python文件项目。

我从Development分支创建了新功能,然后在完成后合并回Development。 将来其他人也将这样做。

我想将“开发”推送到另一个名为“生产”的单独文件夹中,我一生无法解决该问题。

有什么建议吗? 这个怎么做?

谢谢。

尝试时出现此错误。

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'

选项A

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

概要:

git clone <repository> <directory>

例:

git clone <path/to/Development> Production

选项B

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

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM