gitlab删除服务器文件夹,Git:删除GitLab/GitHub仓库中未跟踪的文件而不影响生产服务器的文件...

我最初把我的整个项目推到了GitLab,把这个repo克隆到了一个开发(源代码主)和一个生产(原始产品)服务器上,并且自此建立了一个webhook,触发了关于开发的git pull origin master请求服务器当我推到主分支。

一旦我对结果感到满意,我将'master'分支与'production'分支合并在一起,该分支也为生产服务器附加了webhook(git pull origin production)。由于我的项目主要是(90%)模板文件,我想从GitLab服务器仓库中删除一些文件(这将永远不会改变,例如配置,系统文件),而不会影响(删除)两个文件开发和生产服务器。

我已经在我的本地副本上设置了一个.gitignore文件来解开这些文件。

但是,如何在GitLab服务器上“清理”回购,而不会在我的开发和生产服务器上删除这些文件?

我收到下面当我尝试推到GitLab按照上述帖子手术后:

error: failed to push some refs to 'http://git.mygitlab.com/myproject.git'

hint: Updates were rejected because the remote contains work that you do

hint: not have locally. This is usually caused by another repository pushing

hint: to the same ref. You may want to first integrate the remote changes

hint: (e.g., 'git pull ...') before pushing again.

hint: See the 'Note about fast-forwards' in 'git push --help' for details.

此外,如果任何人有我是否要去我的工作流程正确,那也就可以理解的任何建议。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值