Given that you say you use Java, I'd suggest JGit It's feature packed, and used by many big projects, so it's actively maintained. Also pretty mature, if you worry about stability.
I remember reading an article about this. There was some performance problem with Git, which GitHub fixed internally, then contributed the fix back to Git itself. From this I guess GitHub uses Git, or maybe libgit for their software. GitLab has an open source version, so you can take a look and see for yourself. Also, this might be a good question to ask separately.
Gergely Polonkai
You have to believe in things that are not true. How else would they become?
Given that you say you use Java, I'd suggest JGit It's feature packed, and used by many big projects, so it's actively maintained. Also pretty mature, if you worry about stability.