在Git的分支机构之间共享文件 [英] Sharing files across branches in Git
问题描述
我的项目中有很多文件有时会被修改,但总是在许多不同的分支中共享。例子包括构建脚本,包含路径的批处理文件等,甚至.gitignore文件本身就是一个例子。
我想在源码控制中使用这些东西, t希望各个分支机构跟踪他们的变化。
您如何处理这种情况?
你在Git中跟踪与你的项目相关的所有内容?共享对象的方法是什么?
是.gitignore是我唯一的选择吗?
将您的构建脚本和批处理文件保存在单独的回购站中?
There are a bunch of files in my project that are sometimes modified but always shared among many different branches. Examples include build scripts, batch files that include paths, etc. Even the .gitignore file itself is an example.
I want this stuff in source control, but I don't want individual branches to keep track of changes to them.
How do you handle this situation?
Do you track everything related to your project in Git? What's your approach to shared objects?
Is .gitignore my only option?
Keep your build scripts and batch files in a separate repo?
这篇关于在Git的分支机构之间共享文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!