如何推送.gitignore中指定的文件? [英] How do I push files specified in .gitignore?

查看:169
本文介绍了如何推送.gitignore中指定的文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果我在.gitignore中有一个vendors目录,是否有一种方法可以设置一个远程目录,无论如何,当我执行推送操作时都会收到该目录?

解决方案

我认为您寻找的功能可以通过将分支部署到您的Cloud Provider中来实现。



<设置一个包含你的 .gitignore 文件的 dev 分支,检查你的增量工作到那个分支中。



将您的 dev 分支合并到您的 deploy 分支中,包含 .gitignore 文件,但包含供应商目录。



完成合并后,推送至部署远离 deploy 分支。


If I have a "vendors" directory in my .gitignore, is there a way I can set up a remote that will receive that directory anyway when I do a push?

解决方案

I think the functionality you're looking for can be achieved by having a branch used to deploy to your Cloud Provider.

Setup a dev branch which includes your .gitignore file, check your incremental work into that branch.

Merge your dev branch into your deploy branch which doesn't contain a .gitignore file but contains the vendors directory.

once you've completed your merge, push to the deployment remote from your deploy branch.

这篇关于如何推送.gitignore中指定的文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆