bat脚本 git pull_如何在Windows上使用git pull获得多个存储库?

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?

解决方案

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

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 ..

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.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值