Tag: java

Failure build on Maven release plugin

I’m new to Maven and I’m assigned in a multi module project working with parent pom file. I wanted to change the snapshot project to a release. Even if I added scm tag and the Maven release plugin, the release:prepare goal keeps on failing. This is what I added on the parent pom.xml file: <project> […]

Fetch from one git server and push to another server using Jenkins

I have a local git server (centOS) where everyone pushes their work to that repository. Jenkins manages to build whatever in that repository is, overnight. Lately I’ve got a Git Enterprise account. I’ve been wondering if there’s any way to force Jenkins to 1) Only pulls the code from the local server and 2) Whenever […]

Egit working directory vs. projects in Eclipse

I’m a long time Eclipse user but new to Git/Egit. Recently I’ve been trying to use Egit because I want to use GitHub to collaborate with a number of projects. The projects I want to work on are not Eclipse-specific projects but I’d still like to set up a workflow so that I can work […]

Can a GIT branch have a subset of data?

I am trying to find out if a GIT branch can have a subset of the project data like the example below. I am working on a java, spring, maven project and my source is at src/main/java and my JSP pages are at: src/main/webapp we are thinking of outsource the JSP pages to a diff […]

Eclipse Neon eGit Integration gives Exception 401 Authorization Required

After upgrading to Neon my Egit integration has failed with the following Exception UPDATE: See eclipse bug i.errors.TransportException: https://github.com/[REPOSITORY]/SCA: 401 Authorization Required at org.eclipse.jgit.api.PushCommand.call(PushCommand.java:169) at org.eclipse.egit.core.op.PushOperation.run(PushOperation.java:217) at org.eclipse.egit.ui.internal.push.PushOperationUI.execute(PushOperationUI.java:167) at org.eclipse.egit.ui.internal.push.PushOperationUI$1.run(PushOperationUI.java:229) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55) Caused by: org.eclipse.jgit.errors.TransportException: https://github.com/SCASoftware/SCA: 401 Authorization Required at org.eclipse.jgit.transport.TransportHttp$Service.openResponse(TransportHttp.java:855) at org.eclipse.jgit.transport.TransportHttp$MultiRequestService.execute(TransportHttp.java:956) at org.eclipse.jgit.transport.TransportHttp$Service$HttpExecuteStream.read(TransportHttp.java:882) at org.eclipse.jgit.util.io.UnionInputStream.read(UnionInputStream.java:145) at java.io.FilterInputStream.read(Unknown Source) at org.eclipse.jgit.util.io.TimeoutInputStream.read(TimeoutInputStream.java:112) at org.eclipse.jgit.util.IO.readFully(IO.java:247) at […]

JGit detect rename in working copy

Contex I’m trying to detect possible file rename that occurred after last commit, in a working copy. On my example, I have a clean working copy and I do that: git mv old.txt new.txt Running $ git status shows the expected result: # Changes to be committed: # (use “git reset HEAD <file>…” to unstage) […]

How to restore shelved changes in Intellij when the shelf tab is not shown?

I tried to use the “shelf” feature for the first time in IntelliJ IDEA today. I shelved all my current changes so that I could work on a quick bugfix, commit it, and come back to my current work afterwards. When I commited the “shelf” action, IntelliJ created the shelf and I could see it […]

Retrieving oldest commit with JGit

I am experimenting with JGit for a project and while it mostly works, retrieving the oldest (first) commit does not. Here is the code: RevWalk rw = new RevWalk(new Repository( new File(“/path/to/git”))); RevCommit oldest; Iterator<RevCommit> i = rw.iterator(); if (i.hasNext()) oldest = i.next(); Commit c = oldest.asCommit(rw); //oldest is null here, NPE Does anyone know […]

Found a swap file by the name “.git/.MERGE_MSG.swp”

I tried to pull origin branschName and got this strange error: error: There was a problem with the editor ‘vi’. Not committing merge; use ‘git commit’ to complete the merge. E325: ATTENTION Found a swap file by the name “.git/.MERGE_MSG.swp” owned by: eladb dated: Tue Aug 20 10:52:03 2013 file name: ~eladb/MyWorkspace/Client/.git/MERGE_MSG modified: no user […]

How to import a local GIT/Maven project/folder into eclipse?

So I did git clone to get a maven project from a remote git repository. Great! I have been working in the command line, doing git pull, commit, etc. Great! Now I want to import this project into eclipse and be able to use git inside eclipse through the installed egit. So I did a: […]

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