Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Programmatically read files and information from a Git repository

Tags:

git

I'm on the road right now and started thinking about a project I plan to work on and have a few questions.

I need to be able to read files and information from a (local) Git repository. So my initial thought is just to run Git commands just to fetch required information I need. My other thought is that I could read information from the .git directory which I imagine would be more efficient. Is there any information on this? Which is more efficient? Thanks!

like image 593
APott Avatar asked Aug 12 '13 00:08

APott


People also ask

How do I extract files from GitHub?

To download from GitHub, you should navigate to the top level of the project (SDN in this case) and then a green "Code" download button will be visible on the right. Choose the Download ZIP option from the Code pull-down menu. That ZIP file will contain the entire repository content, including the area you wanted.

How do I find files in GitHub repository?

Open a repository on GitHub and press t to open the File Finder. This let's you find files by name (or name of the directory) in the current repo.


1 Answers

May I point your attention to this project: http://libgit2.github.com/ Might be perfectly suited for what you want to do.

like image 145
Greenflow Avatar answered Sep 22 '22 19:09

Greenflow