From: Shawn Pearce <spearce@spearce.org>
To: sundarbun <sundarbun@yahoo.com>
Cc: git@vger.kernel.org, jgit-dev <jgit-dev@eclipse.org>
Subject: Re: JGIT newbie question
Date: Tue, 11 Jan 2011 11:30:29 -0800 [thread overview]
Message-ID: <AANLkTin=bZAgYeKHN2NUjYjZU5NBC_bs3bpCNNhijppq@mail.gmail.com> (raw)
In-Reply-To: <1294771910028-5911913.post@n2.nabble.com>
On Tue, Jan 11, 2011 at 10:51, sundarbun <sundarbun@yahoo.com> wrote:
> I am looking into using JGit from Java
JGit related questions are probably better directed to the
jgit-dev@eclipse.org mailing list, as that is the list most of the
JGit contributors monitor and answer questions on. The project is
hosted at http://www.eclipse.org/jgit/ so you may find more resources
there too, including the latest 0.10.1 release.
> to get some files from source control
> for an application that runs on AWS.
> We currently use SVNKit and it seems to work fine. We recently made the
> switch to git and I am having a hard time finding a sample that allows one
> to
> (a) init or create a ocal repo with my credentials and path to the tree that
> I am interested in...
Use the Git object in the org.eclipse.jgit.api package. There is an
init method that can create a new repository at the given directory.
> (a) get a bunch of files from my remote repo
Try the checkout() method on the Git object.
> (b) commit any changes back in...
Try the commit() method on the Git object.
But if you want to avoid using the working directory, you'll need to
go through a much lower-level API, setting up your own DirCache, and
using an ObjectReader and ObjectInserter to interact with the
Repository class. Doing this requires some knowledge of the basic Git
data model (commits, trees, blobs).
--
Shawn.
next prev parent reply other threads:[~2011-01-11 19:30 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-11 18:51 JGIT newbie question sundarbun
2011-01-11 19:30 ` Shawn Pearce [this message]
2011-01-11 21:58 ` sundarbun
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='AANLkTin=bZAgYeKHN2NUjYjZU5NBC_bs3bpCNNhijppq@mail.gmail.com' \
--to=spearce@spearce.org \
--cc=git@vger.kernel.org \
--cc=jgit-dev@eclipse.org \
--cc=sundarbun@yahoo.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).