如何在Windows上使用git pull获得多个存储库? [英] How to git pull for multiple repos on windows?

查看:267
本文介绍了如何在Windows上使用git pull获得多个存储库?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以我有很多回购协议,有时我忘记了是否在它们的pulls后面,所以我想知道是否有一种方法可以在一个.bat脚本中为每个repo进行git pull.我看到有人在Linux上做到这一点,我相信此处,但是我在Windows计算机上.有人知道如何在Windows上执行此操作吗?

So I have a lot of repos, and sometimes I forget if some are behind on their pulls, so I was wondering there was a way to git pull for each repo in one .bat script. I saw someone do it for linux I believe here, but I'm on a windows machine. Does anyone know how to do this for windows?

推荐答案

您可以制作一个.bat文件,并以此在其中添加所有存储库

You can make a .bat file in which you add all the repositories yourself with this

cd C:\path\to\git\repo
call git pull
cd C:\path\to\git\repo2
call git pull

或者让它遍历带有git存储库的整个目录

Or let it run through a whole directory with git repositories

FOR /D %G in (C:\Documents\GitRepos\*) Do cd %G & call git pull & cd ..

有一个GUI客户端,而不是.bat文件,它是用于Windows的Github

Instead of .bat file there is a GUI client Github for windows

如果您的所有存储库都在其中,那么记住将它们全部同步将很容易.

If you have all your repositories in there it won't be a pain to remember to sync them all.

这篇关于如何在Windows上使用git pull获得多个存储库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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