Tag: java

How do you do the equivalent of a “git show tagname” with JGit?

I can’t find anything in org.eclipse.jgit.api that looks even remotely plausible. I was under the impression that “git show” is a porcelain command, and I see plenty of other classes for much more obscure commands. Is this possible?

Package org.apache.hadoop.conf does not exist

I am new to compiling Hadoop code and know this question has been answered multiple times. But, I still find it hard figuring out the correct classpath to make the WordCount.java code to compile. I am running a CentOS version 7. My Hadoop Version is: Hadoop 2.7.1 Subversion https://git-wip-us.apache.org/repos/asf/hadoop.git -r 15ecc87ccf4a0228f35af08fc56de536e6ce657a Compiled by jenkins on […]

How does the git-flow plugin integrate into IntelliJ IDEA?

For example, git flow feature start MYFEATURE Is there a way git-flow operations like this can be done from within IntelliJ IDEA?

Eclipse Plugin Project with JGit implementation

I am creating an eclipse plugin with jgit implementation, thus I need a way to show the development history of a project. I guess I need to write the java code to add, commit and push to a repository from the eclipse plugin. How would I be able to do this? Searching the web has […]

How to fix language-level with deploy java heroku

After push to git app Deploy the application then issues a log Error in writing that something is supported language versions above 1.6 but in the beginning you can see that the language version 1.7 > —–> Java app detected —–> Installing OpenJDK 1.7… done —–> Installing Maven 3.1.1… done —–> executing /app/tmp/cache/.maven/bin/mvn -B -Duser.home=/tmp/build_0f74c7a1296de88f7a8d95975dd06c6b […]

How To Use JGit To Do Equivalent Of “git push –mirror …”?

I’m trying to create a simple application that executes a “git push –mirror” operation from the Java domain. The JGit library, specifically the PushCommand class, doesn’t seem to support the “–mirror” option even though it supports “–all” and “–tags”. Am I missing something? How do we use JGit to do “git push –mirror …”?

Create ANT script to build on Tavis-CI and run JUnit tests on commit

I am developing a very simple application using Java, and using JUnit to test the application. I need to be able to create an ANT script as well as a .travis.yml file so that my project can 1) build on Travis, and 2) Automatically run the JUnit tests on each commit. You can see my […]

Get the list of changed files after a pull with JGit

I would like to know how I can retrieve the list of changed files after a pull request. I’m using this to get all the merged commits, but I want to know all the changed files. Git git = new Git(localRepo); PullCommand pullCmd = git.pull(); PullResult pullResult = pullCmd.call(); MergeResult mergeResult = pullResult.getMergeResult(); ObjectId[] mergedCommits […]

PullCommand throws 'Nothing to fetch' exception in JGit

I am using JGit library in my project. Here is my JGit util class: public class GitUtil { private static final RefSpec REF_SPEC = new RefSpec(Constants.GIT_REF_SPEC); private static final RefSpec REMOTE_REF_SPEC = new RefSpec(Constants.GIT_REMOTE_REF_SPEC); private static final CredentialsProvider credentialsProvider = new UsernamePasswordCredentialsProvider(Constants.GIT_REMOTE_USER_NAME, Constants.GIT_REMOTE_PASSWORD); private static Git git; @Autowired private HibernateUtilServiceImpl hibernateUtilServiceImpl; @PostConstruct public void initGitRepository() […]

Should I be checking in these gradle files?

Should the following modified files be checked in into a repo? I am guessing not but since I am new to the tools around Java, I thought I’d ask. modified: .gradle/3.5.1/fileContent/annotation-processors.bin modified: .gradle/3.5.1/fileContent/fileContent.lock modified: .gradle/3.5.1/taskHistory/fileHashes.bin modified: .gradle/3.5.1/taskHistory/fileSnapshots.bin modified: .gradle/3.5.1/taskHistory/jvmClassSignatures.bin modified: .gradle/3.5.1/taskHistory/taskHistory.bin modified: .gradle/3.5.1/taskHistory/taskHistory.lock modified: .idea/workspace.xml What gitignore rule will take care of any files from […]

Git Baby is a git and github fan, let's start git clone.