I am learning to push code to git using jgit. I am able to push all the files to git, but I only want to add new files or update the changes to git. Please suggest:
Below is my code:
Git git = Git.open(new File(repoPath)); // connect to github
// I want some code which recognizes the new additions or finds the files changed
git.add().addFilepattern(".").call(); // Want to add only the delta
git.commit().setMessage("commit - 1").call();
git.push().setCredentialsProvider(cp).call();