更新文件夹中的所有回购? [英] Updating all repos in a folder?

查看:115
本文介绍了更新文件夹中的所有回购?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个文件夹 - 'Repos' - 其中包含我感兴趣的回购站点。这些文件已经从bitbucket中克隆出来,但我猜github也可能是一个源代码。

I've got a folder - 'Repos' - which contains the repos that I'm interested in. These have been cloned from bitbucket, but I guess github could be a source too.

Repos
    - music-app
    - elephant-site
    - node-demo

是否有一个git命令可以使用哪些步骤通过Repos中的每个文件夹并查看服务器上是否存在新的提交以及下载新的东西?如果在本地有新的提交,请上传这些内容。

Is there a git command that I can use which steps thru every folder in Repos and sees if there are new commits on the server, and the download the new stuff? And if there are new commits locally, then upload these.

推荐答案

试试这个:

Try this:

cd repos
find . -maxdepth 1 -type d -exec sh -c '(cd {} && git pull)' ';'

这篇关于更新文件夹中的所有回购?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆