如何推送.gitignore中指定的文件? [英] How do I push files specified in .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屋!