问题
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