我该如何做jgit的“git remote update”? [英] How do I do the equivalent of “git remote update” with jgit?
本文介绍了我该如何做jgit的“git remote update”?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
$ b我使用--mirror管理克隆的git repos,并且需要使用JGit执行
git remote update
。 $ b 我使用FetchCommand还是有其他命令?
什么是的等价FetchCommand> git remote update
?
解决方案
您应该使用 FetchCommand
和调用 setRemote
来指定想要从中获取的远程名称。
如果你有多个你想要的遥控器为从中获取的每个远程创建一个新的 FetchCommand
实例。
I'm managing git repos cloned with --mirror, and I need to do a git remote update
using JGit.
Do I use a FetchCommand, or is there any other command?
What is the equivalent FetchCommand of a git remote update
?
解决方案
You should use FetchCommand
and call setRemote
to specify the name of the remote you want to fetch from.
If you have multiple remotes you want to fetch from, create a new FetchCommand
instance for each remote you are fetching from.
这篇关于我该如何做jgit的“git remote update”?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文