简体   繁体   中英

Is there any Jgit API by which we can read contents from particular file on GIT repo. without cloning all the data inside it

I have a requirement to read and fetch the data from a particular file on GIT Repo. This file data gets changed for every release so there are lots of branches from where I have to fetch those file data.

My issue is I don't want to clone the entire repo. Is it possible to clone that particular file only for every branch or remotely read the data without cloning anything?

Whatever I know there is no any Jgit API to clone any particular data file inside a folder, we have to clone the entire repo to read any data inside it.

Can anyone guide me on this?

Thanks, Anshu

Instead of jgit I would use the library from https://github.com/hub4j/github-api which allows to access and fetch data from github directly.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM