windows批量导入git项目脚本示范(三种方式,亲测可用)
我们使用微服务这些来设计项目时会产生很多项目,而新人刚来要拉取所有项目时,只能一个个拉取,很麻烦浪费时间,因此使用脚本一次性拉取是比较好的,一次编写脚本,随时可以快速再次拉取所有项目,更加简便。
无权限验证
前两行是建立一个你项目的文件夹(yourprojectname),然后进去克隆项目,不需要的话可以直接删除
然后给后面每一个git clone后面的项目地址替换为你要的
mkdir yourprojectname
cd yourprojectname
git clone git@github.com:HumorChen/idea2021.3-use-for-free.git
git clone git@github.com:HumorChen/idea2021.3-use-for-free.git
git clone git@github.com:HumorChen/idea2021.3-use-for-free.git
git clone git@github.com:HumorChen/idea2021.3-use-for-free.git
git clone git@github.com:HumorChen/idea2021.3-use-for-free.git
git clone git@github.com:HumorChen/idea2021.3-use-for-free.git
git clone git@github.com:HumorChen/idea2021.3-use-for-free.git
git clone git@github.com:HumorChen/idea2021.3-use-for-free.git
将上面代码保存为clone.bat并直接双击打开即可运行
使用本地git里的账号密码SSH鉴权
前两行是建立一个你项目的文件夹(yourprojectname),然后进去克隆项目,不需要的话可以直接删除
然后给后面每一个git clone后面的项目地址替换为你要的
你本地的ssh密钥要设置到你的账户里去
mkdir yourprojectname
cd yourprojectname
git clone git@github.com:HumorChen/idea2021.3-use-for-free.git
git clone git@github.com:HumorChen/idea2021.3-use-for-free.git
git clone git@github.com:HumorChen/idea2021.3-use-for-free.git
git clone git@github.com:HumorChen/idea2021.3-use-for-free.git
git clone git@github.com:HumorChen/idea2021.3-use-for-free.git
git clone git@github.com:HumorChen/idea2021.3-use-for-free.git
git clone git@github.com:HumorChen/idea2021.3-use-for-free.git
git clone git@github.com:HumorChen/idea2021.3-use-for-free.git
将上面代码保存为clone.bat并直接双击打开即可运行
使用个人密钥鉴权走http方式克隆
前两行是建立一个你项目的文件夹(yourprojectname),然后进去克隆项目,不需要的话可以直接删除
然后给后面每一个git clone后面的项目地址替换为你要的
你要在你的git账户里创建一个私人密钥
下面的oauth2:%1@你可以最后再全局替换一下,先直接按http链接写好所有的git clone语句,最后直接走全部替换github.com为oauth2:%1@github.com即可完成对密钥的插入了。
mkdir yourprojectname
cd yourprojectname
git clone https://oauth2:%1@github.com/HumorChen/idea2021.3-use-for-free.git
git clone https://oauth2:%1@github.com/HumorChen/idea2021.3-use-for-free.git
git clone https://oauth2:%1@github.com/HumorChen/idea2021.3-use-for-free.git
git clone https://oauth2:%1@github.com/HumorChen/idea2021.3-use-for-free.git
git clone https://oauth2:%1@github.com/HumorChen/idea2021.3-use-for-free.git
git clone https://oauth2:%1@github.com/HumorChen/idea2021.3-use-for-free.git
git clone https://oauth2:%1@github.com/HumorChen/idea2021.3-use-for-free.git
将上面代码保存为clone.bat,并在当前目录打开cmd命令行,执行一下命令
# yourtoken是你的私人密钥
clone.bat yourtoken
本文来自博客园,作者:HumorChen99,转载请注明原文链接:https://www.cnblogs.com/HumorChen/p/18039500
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· TypeScript + Deepseek 打造卜卦网站:技术与玄学的结合
· Manus的开源复刻OpenManus初探
· AI 智能体引爆开源社区「GitHub 热点速览」
· 从HTTP原因短语缺失研究HTTP/2和HTTP/3的设计差异
· 三行代码完成国际化适配,妙~啊~