How do I do the equivalent of “git remote update” with jgit?

落花浮王杯 提交于 2019-12-13 16:16:37

问题


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?


回答1:


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.



来源:https://stackoverflow.com/questions/9594827/how-do-i-do-the-equivalent-of-git-remote-update-with-jgit

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!