Git - Get file blob by tree location not by sha
I'm trying to use GitHub's API to retrieve the blob of a file. I know I could start at the master and run through the entire tree, grabbing commit SHA's, until I make a match to the path I want, but that seems like so many queries and so much overhead.
开发者_如何学PythonIs it possible to pass in something to git like "master/folder/file.txt" and get the blob information in one query?
I just want to display the most recent version of the file in the master branch.
This is what I'm looking at: http://developer.github.com/v3/git/ I just don't know where I should be looking. I'm running through the book now trying to find something.
It's very simple when using Github I found out.
You just need to query the raw.github.com instead of api.github.com
https://raw.github.com/senica/Booger/master/admin/admin.php
精彩评论