flyboarder flyboarder - 3 months ago 32
Git Question

Subtree push in JGit

I am writing a little app using JGit and ran into a problem. It seems the JGit docs are very limited, and doesn't give much suggestion for where to go for plumbing tasks. (http://wiki.eclipse.org/JGit/User_Guide)

What is the JGit version of

git subtree push --prefix folder upstream branch
?

Answer

Unfortunately no. git-subtree is a git extension build on top of standard commands.

However you can try to rewrite cmd_push logic in java by using org.eclipse.jgit.api.GitCommand implementations.