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?