Need help in pushing files to an existing branch using Jgit.
I tried:
git.checkout().setName(existingBranchName).call();
git.add().addFilePattern(fileName).call();
git.commit().setMessage("commit message").call();
git.push().setRemote("origin").setCredentialProvider(credentials).call();
Not getting any exceptions but the commit is not pushed to that branch.