Tag: java

Arrow up and number on Eclipse meaning

I’m working on a project using Eclipse with Maven and Bitbucket. Right now I can’t do any commit, I mean even if I press the commit button, I can’t see it on Bitbucket. Furthermore, next to my project’s name I got a symbol with an arrow up and the number 2 next to it. What […]

Version numbering / release mechanics with Maven and GitHub

I’m trying to work out the optimal way of managing my workflow to allow version numbering and releases with Maven and Git. Currently my workflow is: Edit pom.xml to indicate a new snapshot version “1.2.3-SNAPSHOT” Commit to git with message “start work on 1.2.3-SNAPSHOT” Do coding work, commit after each successful “mvn test” etc. Once […]

Git doesn't recognize renamed and modified package file

I had a java file called package/old/myfile.java. I had committed this file through git. I then renamed my package to new so my file was in package/new/myfile.java. I now want to commit this file rename (and content changes) to git. When I do git status I get # Changes not staged for commit: # (use […]

JGIT Pull NoHeadException

When is try to execute the following method (uses JGIT library) private void pullRepo() throws IOException,GitAPIException, WrongRepositoryStateException, InvalidConfigurationException, DetachedHeadException, InvalidRemoteException, CanceledException, RefNotFoundException, NoHeadException{ Git git = new Git(localRepo); git.pull().call(); } I get the following runtime exception: org.eclipse.jgit.api.errors.NoHeadException: Pull on repository without HEAD currently not supported at org.eclipse.jgit.api.PullCommand.call(PullCommand.java:161) Does someone know how to solve this? The […]

How to disable git 'Push Results' dialog in eclipse

After a push to upstream git operation the eclipse IDE shows a helpful dialog which provides information about the push operation (shown below). Is there a way to prevent this dialog from popping up?

Heroku Java app crashing locally but not on the web

I have my main class: public class Main { public static void main(String[] args){ Spark.port(getHerokuAssignedPort()); get(“/hello”, (req, res) -> “Hello Heroku World”); } private static int getHerokuAssignedPort() { ProcessBuilder processBuilder = new ProcessBuilder(); if (processBuilder.environment().get(“PORT”) != null) { return Integer.parseInt(processBuilder.environment().get(“PORT”)); } return 4567; //return default port if heroku-port isn’t set (i.e. on localhost) } } […]

How do I add existing eclipse java project to git

How do I add an existing java project in eclipse to git? I noticed when creating the project there was an option to add to source control but I can’t find this option for an existing project. Is this possible from the git plugin in eclipse or must it be done from the command line? […]

Where are Jgit javadocs?

I can’t find javadocs for jgit. I tried to build jgit with maven, but the build fails so I ask for your help. Where I can find javadocs for jgit.

Best way to upload/deploy jar files in Github

I’ve used in the past google code and had the ability to upload runnable jar files for download, now i am using Github and understand it had a Download Tab where developers were able to upload files (i.e. a runnable jar file), unfortunately it is deprecated now. is there another/better way to deploy/upload a runnable […]

How to easily Git commit in Eclipse Neon

I just upgraded to Eclipse Neon from Mars. Earlier I could just select “Commit” from the “Team” menu, and the dialog would provide checkboxes for the files I wanted to stage. I could easily hit “select all” and all files would be staged. In fact, the files already in the repository would already be checked, […]

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