Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EGit » jGit FetchCommand
jGit FetchCommand [message #912905] Fri, 14 September 2012 07:34 Go to next message
R J is currently offline R J
Messages: 8
Registered: August 2012
Junior Member
Hi

I understand the concept of Git fetch. I would like to fetch objects through the FetchCommand class.

I have a main repository. For example: C:\jGit\.git.
I have cloned this repository. For example C:\jGitClone\.git.

Using the jGit API I have a Git class:

Git git = new Git(repository); // this is the main repository.

How would I set the cloned repository so when the fetch is called it knows to fetch into the cloned repository.

I have looked on some websites but still stuck.

[Updated on: Fri, 14 September 2012 07:35]

Report message to a moderator

Re: jGit FetchCommand [message #925287 is a reply to message #912905] Thu, 27 September 2012 11:18 Go to previous message
Matthias Sohn is currently offline Matthias Sohn
Messages: 548
Registered: July 2009
Senior Member
Have a look at EGit's FetchOperation [1] or JGit's FetchCommandTest [2].

[1] https://git.eclipse.org/c/egit/egit.git/tree/org.eclipse.egit.core/src/org/eclipse/egit/core/op/FetchOperation.java
[2] https://git.eclipse.org/c/jgit/jgit.git/tree/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/FetchCommandTest.java
Previous Topic:Use EGit For PHP Deployment (like FTP client)
Next Topic:History list of commits invisible
Goto Forum:
  


Current Time: Fri Aug 01 04:03:44 EDT 2014

Powered by FUDForum. Page generated in 0.01753 seconds