I need to add the file to the repository and then commit it from my java project. I use
Runtime.getRuntime().exec("C:\\Program Files (x86)\\Git\\bin\\sh.exe");
to start git but what should I do next?
Instead of running the command line tool directly from your Java application, consider using Git APIs for Java, such as JavaGit. The cookbook has examples that you can follow.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With