首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >git生产、开发环境

git生产、开发环境
EN

Stack Overflow用户
提问于 2015-09-19 02:08:34
回答 1查看 86关注 0票数 0

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

我为新特性创建了Development分支,然后在完成后合并回Development。其他人将来也会这样做。

我想把"Development“推到另一个叫做"Production”的单独文件夹中,但我这一生都想不出该怎么做。

有什么建议吗?该怎么做呢?

谢谢。

我在尝试的时候遇到了这个错误。

代码语言:javascript
复制
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'
EN

回答 1

Stack Overflow用户

发布于 2015-09-19 02:24:37

选项A

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

简介:

代码语言:javascript
复制
git clone <repository> <directory>

示例:

代码语言:javascript
复制
git clone <path/to/Development> Production

选项B

将文件夹开发的内容(包括.git文件夹)复制到文件夹生产中。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/32658445

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档