当前位置:   article > 正文

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

bat脚本git

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.

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/weixin_40725706/article/detail/464259
推荐阅读
相关标签
  

闽ICP备14008679号