tuler
tuler

Reputation: 3399

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

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?

Upvotes: 3

Views: 1250

Answers (1)

Kevin Sawicki
Kevin Sawicki

Reputation: 3030

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.

Upvotes: 4

Related Questions