管理许多git存储库 [英] Managing many git repositories
问题描述
我使用这些存储库在多个地方工作。当我对某个版本库进行更改时,我希望能够更新其他地方的版本库。
因此,我有一个包含许多存储库的目录。
- 如何获取所有这些变量?
- 如何检查其中是否有未变更的变更?
- How can I fetch all of them?
- How can I check whether any of them have uncommitted changes?
- How can I check whether any of them have changes to merge?
$ b 只需一个命令就可以完成这些任务。
输出需要保持沉默,才能真正注意到要做的事情。
看起来像编写一个脚本来做这件事很容易。本质上它需要迭代存储库,然后使用git ls-files,git diff和git log命令。
Setting up a project is easy in git and so I can have separate repository even for small script. Now the problem is how to manage them.
I work in multiple places with these repositories. When I have done changes to some repository, I want to be able to update the repositories in other places.
So I have a directory with many repositories in it.
And it would be nice to be able to do these with one command.
The output needs to be silent enough to actually notice the things to do.
Looks like writing a script to do it is quite easy. Essentially it needs to iterate over the repositories and then use commands like git ls-files, git diff and git log.
这篇关于管理许多git存储库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!