Community
Participate
Working Groups
--git-dir D:\temp\clone1\.git commit -m 'first commit' org.eclipse.jgit.api.errors.JGitInternalException: Entry not found by path: commit' at org.eclipse.jgit.api.CommitCommand.createTemporaryIndex(CommitCommand.java:415) at org.eclipse.jgit.api.CommitCommand.call(CommitCommand.java:195) at org.eclipse.jgit.pgm.Commit.run(Commit.java:87) at org.eclipse.jgit.pgm.TextBuiltin.execute(TextBuiltin.java:148) at org.eclipse.jgit.pgm.Main.execute(Main.java:191) at org.eclipse.jgit.pgm.Main.run(Main.java:120) at org.eclipse.jgit.pgm.Main.main(Main.java:94) See also comments on http://egit.eclipse.org/r/#patch,sidebyside,4720,1,org.eclipse.jgit.test/tst/org/eclipse/jgit/pgm/CLIGitCommand.java
Quoting is someting the shell handles. jgit is not a shell so it relies on the shell that invokes it to parse the argument. CMD.exe does not recognize single quotes which is why this fails in cmd, possibly in powershell too, but it will work in bash, even on Windows. JGit should not try to interfere with the shell you are using.