Im using Jgit.
My source code is in github, so I have cloned it in to a local directory and I run my sample code from there.
What my sample code does is clone another git repository to a temp directory in my local machine and do some changes and commit it and push it.
When the commit happens it happens not to the temporary cloned one, instead of that its commiting to my working directory which has my sample source code.
Following is my code,
GitAgent gitAgent = new JGitAgent();
RepositoryClient client = new GitRepositoryClient(gitAgent);
client.retireveMetadata(repoURL, false, workDir);
client.commitLocally("Committing POM file updates.", true, workDir);
client.pushLocalCommits(repoURL, "master", workDir);
Am I missing anything here ? Any help would be much appreciated.