Questions tagged [jgit]

JGit is an EDL (new-style BSD) licensed, lightweight, pure Java library implementing the Git version control system.

JGit is an EDL (new-style BSD) licensed, lightweight, pure Java library implementing the version control system.

It is developed as part of the Eclipse Git Plugin .

JGit Supports:

  • Repository access routines
  • Network protocols
  • Core version control algorithms
  • Implementation of many porcelain commands
  • tasks for performing Git operations as part of automated builds
  • A Git daemon to provide a simple Git server
  • A jgit commandline tool for working with Git repositories

For details visit the Project page or the User Guide, there is also API Documentation available.

The community-provided jgit-cookbook provides ready-to-run snippets that show how things can be achieved when using JGit

956 questions
-1
votes
1 answer

JGit: Fastest way to retrieve the File Object Blob without accessing its data

I need the last commit with affected the path something similar to git log -1 -- path. Currently, I am doing this TreeWalk.forPath(repo, filepath, rootCommit.getTree()).getObjectId(0) Is there any faster way to achieve this?
-2
votes
1 answer

Implementing gerrit command in Jgit

I want to implement this commmand in Git,But I don't know what to do? push origin HEAD:refs/for/master
-2
votes
3 answers

Add only new files using jgit

I am learning to push code to git using jgit. I am able to push all the files to git, but I only want to add new files or update the changes to git. Please suggest: Below is my code: Git git = Git.open(new File(repoPath)); // connect to github // I…
Saurabh Jhunjhunwala
  • 2,832
  • 3
  • 29
  • 57
-2
votes
1 answer

How to show history with remote git repository only in JGit

I only want to run the git log command to get some commit info, and don't want to do it after cloning a remote reprository to local. Wonder if there is quick way for JGit here?
-2
votes
1 answer

Access Remote Git Repo

I want to access the remote repo files of all branches to analyze the committed code without cloning to the local through java. How can I achieve this one and what is the procedure if there any way to do? Thanks in advance.
Rock Star
  • 31
  • 4
-2
votes
2 answers

is possible to work only with a part of a git repository?

i'm developing a desktop app with JGit in order to build a cloud system for storing files. Now, several users contribute to the same repository, but not everyone are interested to work with whole project. For example, i'm developing with others a…
-2
votes
2 answers

JGIT: FATAL: Could not initialize class org.eclipse.jgit.transport.Transport

When I use Jenkins to build my project, I got error: Could not initialize class org.eclipse.jgit.transport.Transport java.lang.NoClassDefFoundError: Could not initialize class org.eclipse.jgit.transport.Transport at…
Einsamer
  • 1,069
  • 4
  • 17
  • 34
-2
votes
1 answer

Identify excluded directory in git

I have a java project and when I remove a directory with some classes I can not identify in the git repository was removed, I can only identify that all classes have been removed. I need to identify it because I have a tool that makes transferring…
-2
votes
1 answer

Where to add the path of head/ref/master in github

I am using the jgit . I am new to it i am able to clone the code from github but when i tried to push code in java it is giving me error. Here's code : public class PullFromRemoteRepository { private static final String REMOTE_URL =…
user3352615
  • 119
  • 2
  • 5
  • 13
-3
votes
2 answers

newOutputStream Close file

I write to file some text after check by XmlParser. All work fine, but code, don't close that file, then i have problem latter in program with it. It create .tmp file. How close my file after that action ? def path = new File("my/path")) def xml =…
John Doe
  • 147
  • 1
  • 1
  • 10
-3
votes
1 answer

Eclipse GIT issue: Unable to checkout branch (The filename, directory name, or volume label syntax is incorrect)

Git throws exception 'The filename, directory name, or volume label syntax is incorrect' when I tried to checkout a existing branch. Error log: org.eclipse.jgit.api.errors.JGitInternalException: The filename, directory name, or volume label syntax…
Array out of bound
  • 1,133
  • 7
  • 24
1 2 3
63
64