|JGit: Push to specific branch [message #1066719]
||Thu, 04 July 2013 05:20
| Tim Braun
Registered: July 2013
I have two branches on GitHub: master and development. I want to push a newly created file to the development branch.|
String user = "user";
String password = "password";
String localPath = "local";
String remotePath = "..."; //here would be the url to github but i am not allowed to post a link in the forum
Git localGit = Git.open(new File(localPath));
localGit.push().setCredentialsProvider(new UsernamePasswordCredentialsProvider(user, password)).call();
What I get is a
TransportException: Nothing to push.
What's the problem there? How can I make this work?
Powered by FUDForum
. Page generated in 0.09549 seconds