I have a git repository that contains other git repositories. Are there commands that recursively push and/or pull for not only the meta-repository but the sub-repositories?
相关问题
- PHP Recursively File Folder Scan Sorted by Modific
- Why does recursive submodule update from github fa
- Extended message for commit via Visual Studio Code
- Emacs shell: save commit message
- Can I organize Git submodules in a flat hierarchy?
相关文章
- 请教Git如何克隆本地库?
- GitHub:Enterprise post-receive hook
- Git Clone Fails: Server Certificate Verification F
- SSIS solution on GIT?
- Is there a version control system abstraction for
- Recursively replace keys in an array
- Python: Maximum recursion depth exceeded when prin
- Is recursion good in SQL Server?
I've just write a script to execute recursively on multiple git repositories. You can grab it from here:
https://github.com/DariuszOstolski/rgit
The idea is exactly the same as in clustergit but implementation differs.
if you are talking about submodules, see cupcakes answer.
if you are talking about some folder hierarchy containing git repos, you can checkout
clustergit
, a tool i programmed: https://github.com/mnagel/clustergitI find myself in the same situation whenever I want to update my llvm/clang repositories and with a bit of bash help I can 'git pull' each of them like this:
$> for dir in $(find . -name ".git"); do cd ${dir%/*}; git pull ; cd -; done
This will 'git pull' all git repos found under your current directory, and probably wont work if they are bare repositories.
I needed this a while back and made a cli available through npm. https://github.com/kenglxn/gitr/blob/master/README.md
Just do "npm install -g gitr" and then you can do any git command recursively by using gitr.
Not quite
git pull
, but close:From the Git docs: