Tag: java

Repair links between moved files in Mercurial

Over the course of having this repo (originally SVN) I’ve not been to good with keeping file links together. I’ve changed IDE’s twice, split the project into Netbeans modules, and mavenized the project over its time. Most of the file history is lost, mainly because during mavenizing I deleted the entire trunk, committed, copied over […]

command line version control with Java — dealing with lots of nested dirs

Using command line git with Java. Our project has tons of nested packages which of course means lots of nested directories. Typing out these directories on the command line is becoming a PITA and seems unavoidable for certain non-everyday operations like “git rm”. Especially when I move stuff around in Eclipse then need to play […]

How do I set up a new Java project with Eclipse, Maven, Grails and git?

I’m new to Grails development and would like to set up a new project, so I can use Eclipse as IDE and build it on my CI (Jenkins) with Maven. This is my environment: Java 1.6.0 Grails 2.1.0 Maven 2.2.1 Eclipse Juno with the m2e and egit plugins I used the following commands from http://grails.org/doc/latest/guide/commandLine.html#antAndMaven: […]

Using Git with Eclipse causing lots of errors

I made a HelloWorld app in Eclipse that had no errors and runs fine. It was located in Android/workspace/HelloWorld Then I created a Git repo elsewhere in, say Git/MyApp I want to have MyApp contain the HelloWorld project from eclipse, and when I make edits to HelloWorld, it will show up in git status and […]

JGit: Status of remote repository

I’m trying to get the status of a Git repository using JGit in Eclipse. I found some examples here: 1, 2 and merged them: import java.io.File; import java.io.IOException; import org.eclipse.jgit.api.Git; import org.eclipse.jgit.api.errors.GitAPIException; import org.eclipse.jgit.api.errors.InvalidRemoteException; import org.eclipse.jgit.api.errors.TransportException; import org.eclipse.jgit.lib.Repository; import org.eclipse.jgit.storage.file.FileRepositoryBuilder; import org.eclipse.jgit.api.Status; public class Main { private static final String REMOTE_URL = “https://github.com/github/testrepo.git”; public static […]

Git Post Hook to Kick Off Jenkins Job

I would like to setup a post hook in git to kick off a jenkins job everytime someone does a push to the git server. The issue is that some of the projects are on Linux, some are on windows and others on mac. Everytime someone does a push into my git repo I would […]

Maven Release Plugin hangs at git push

This question already has an answer here: Maven – Error Releasing Code to GitHub (Hangs After Push) 8 answers

How can one both be able to use IntelliJ to manage a project's configuration and yet also have a VCS repository with none of IntelliJ's metadata?

I have two things that I want to do that seem like they are in conflict with each other. On the one hand, I would like to use IntelliJ’s GUI interface to manage my project’s configuration and so I would like to put the metadata in its version-controlled repository. On the other hand, I want […]

Play Framework 2.2 subprojects

I’m trying to add a subproject to my Play Framework project, and find the docs generally lacking there. I’ve created a play project, let’s call it my-web, and it’s in directory /my-cool-project/web. I also have another project I would like my-web to depend on, let’s call it my-model. my-model a git submodule for my-cool-project, and […]

git addfilepattern can't read my directory path

I have wrote a custom git-add ant task and I want it to add files only from stated directory. The task line looks like this: <gitadd repository=”./project” dir=”./project/src”/> And here is how I add using jgit I get dir like this: public void setDir(String dir) { this.dir = dir; } And I add it like […]

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