I'm wondering is it possible to do following "stupid" thing required by my current project and asking for your help in pointing me towards right solution.
我想知道是否有可能按照我当前项目所要求的“愚蠢”事情,并请求你的帮助指出我正确的解决方案。
The source code tree consist of let's say 4000 of text files. These files a standard, the base, I need to keep them, but generally don't want to add them to compilation process — because it will last forever. Only 500 of them are part of my custom solution and the team modifying them very often. These files need to be sent to recompilation, let's say every hour.
源代码树包含4000个文本文件。这些文件是一个标准,基础,我需要保留它们,但通常不希望将它们添加到编译过程中 - 因为它会永远持续下去。其中只有500个是我的自定义解决方案的一部分,团队经常对其进行修改。这些文件需要发送到重新编译,比方说每小时一次。
We've used tool for creating combined file for all 500 files we need. It searches for given pattern in all files and creates resulting file — big text object where all source files a stored one by one. The same behavior as you have by running copy *.txt all.txt
on Windows.
我们使用工具为我们需要的所有500个文件创建组合文件。它在所有文件中搜索给定的模式并创建结果文件 - 大文本对象,其中所有源文件一个接一个地存储。与在Windows上运行copy * .txt all.txt时的行为相同。
The question is is it possible to achieve same behavior with git grep
only? Grep is fast and we're using git already.
问题是只能用git grep实现相同的行为吗? Grep很快,我们已经使用git了。
Maybe are there any other strategies to have store two overlapping sets of files in git and treat them differently without custom tools? Branches and tags can't help as I see it...
也许还有其他策略可以在git中存储两组重叠的文件,并且在没有自定义工具的情况下以不同方式对待它们?我看到分支和标签无法帮助...
1 个解决方案
#1
0
The obvious answer was: to create own tool which will integrate seamlessly to the git, since git allows creation of its commands.
显而易见的答案是:创建自己的工具,它将无缝集成到git,因为git允许创建它的命令。
The example implementation could be found at https://github.com/shytikov/git-nav/
可以在https://github.com/shytikov/git-nav/找到示例实现。
#1
0
The obvious answer was: to create own tool which will integrate seamlessly to the git, since git allows creation of its commands.
显而易见的答案是:创建自己的工具,它将无缝集成到git,因为git允许创建它的命令。
The example implementation could be found at https://github.com/shytikov/git-nav/
可以在https://github.com/shytikov/git-nav/找到示例实现。