I would like to know that Is it possible to embed GIT repositories with a web application server? When the server start up, repository will be up and if down; will be down.
Or, Can I add git repo with a perticular web application?
and How can I read a file from GIT repositories through JAVA API.
Thanks
To read file from git through Java API, you can use jgit.
I find this page is quite good. http://www.doublecloud.org/2013/01/how-to-read-git-repository-using-java-apis/
To make the availability of your git server following the status of your web server, i think it's just a matter of startup/shutdown script configuration of your web server script.