Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我看到在 CI 构建中获取源代码时使用 Shallow Fetch 的想法,因为它只获取每个文件的最新版本。
但我更怀疑何时进行多次修订。
你什么时候使用 Shallow Fetch > 1 或者根本不使用它?
当您需要历史拓扑来执行您想要在构建中执行的操作时。
例如,一些使用git describe或计算自最后一个标签以来的提交次数以生成语义版本控制版本号。
git describe