CARVIEW |
Select Language
HTTP/2 302
server: nginx
date: Fri, 08 Aug 2025 06:10:40 GMT
content-type: text/plain; charset=utf-8
content-length: 0
x-archive-redirect-reason: found capture at 20140102124048
location: https://web.archive.org/web/20140102124048/https://developer.github.com/v3/git/trees/
server-timing: captures_list;dur=0.760888, exclusion.robots;dur=0.035926, exclusion.robots.policy;dur=0.023101, esindex;dur=0.012395, cdx.remote;dur=26.072470, LoadShardBlock;dur=172.676192, PetaboxLoader3.datanode;dur=37.588996, PetaboxLoader3.resolve;dur=71.146797
x-app-server: wwwb-app201
x-ts: 302
x-tr: 231
server-timing: TR;dur=0,Tw;dur=0,Tc;dur=1
set-cookie: wb-p-SERVER=wwwb-app201; path=/
x-location: All
x-rl: 0
x-na: 0
x-page-cache: MISS
server-timing: MISS
x-nid: DigitalOcean
referrer-policy: no-referrer-when-downgrade
permissions-policy: interest-cohort=()
HTTP/2 200
server: nginx
date: Fri, 08 Aug 2025 06:10:40 GMT
content-type: text/html
x-archive-orig-server: GitHub.com
x-archive-orig-last-modified: Wed, 01 Jan 2014 14:37:45 GMT
x-archive-orig-expires: Thu, 02 Jan 2014 12:50:48 GMT
x-archive-orig-cache-control: max-age=600
x-archive-orig-content-length: 20274
x-archive-orig-accept-ranges: bytes
x-archive-orig-date: Thu, 02 Jan 2014 12:40:48 GMT
x-archive-orig-via: 1.1 varnish
x-archive-orig-age: 0
x-archive-orig-connection: close
x-archive-orig-x-served-by: cache-jfk1029-JFK
x-archive-orig-x-cache: MISS
x-archive-orig-x-cache-hits: 0
x-archive-orig-x-timer: S1388666448.561278105,VS0,VE14
x-archive-orig-vary: Accept-Encoding
x-archive-guessed-content-type: text/html
x-archive-guessed-charset: windows-1250
memento-datetime: Thu, 02 Jan 2014 12:40:48 GMT
link: ; rel="original", ; rel="timemap"; type="application/link-format", ; rel="timegate", ; rel="first memento"; datetime="Thu, 23 Jun 2011 02:03:44 GMT", ; rel="prev memento"; datetime="Fri, 22 Nov 2013 06:26:49 GMT", ; rel="memento"; datetime="Thu, 02 Jan 2014 12:40:48 GMT", ; rel="next memento"; datetime="Tue, 28 Jan 2014 23:21:02 GMT", ; rel="last memento"; datetime="Tue, 06 May 2025 18:19:47 GMT"
content-security-policy: default-src 'self' 'unsafe-eval' 'unsafe-inline' data: blob: archive.org web.archive.org web-static.archive.org wayback-api.archive.org athena.archive.org analytics.archive.org pragma.archivelab.org wwwb-events.archive.org
x-archive-src: alexa20140103-09/52_37_20140102124035_crawl101.arc.gz
server-timing: captures_list;dur=0.466911, exclusion.robots;dur=0.021639, exclusion.robots.policy;dur=0.013928, esindex;dur=0.010011, cdx.remote;dur=10.743481, LoadShardBlock;dur=175.694359, PetaboxLoader3.datanode;dur=239.564429, load_resource;dur=209.792702, PetaboxLoader3.resolve;dur=109.391704
x-app-server: wwwb-app201
x-ts: 200
x-tr: 462
server-timing: TR;dur=0,Tw;dur=0,Tc;dur=1
x-location: All
x-rl: 0
x-na: 0
x-page-cache: MISS
server-timing: MISS
x-nid: DigitalOcean
referrer-policy: no-referrer-when-downgrade
permissions-policy: interest-cohort=()
content-encoding: gzip
Git Trees | GitHub API
Trees
Get a Tree
GET /repos/:owner/:repo/git/trees/:sha
Response
Status: 200 OK
X-RateLimit-Limit: 5000
X-RateLimit-Remaining: 4999
{
"sha": "9fb037999f264ba9a7fc6274d15fa3ae2ab98312",
"url": "https://api.github.com/repos/octocat/Hello-World/trees/9fb037999f264ba9a7fc6274d15fa3ae2ab98312",
"tree": [
{
"path": "file.rb",
"mode": "100644",
"type": "blob",
"size": 30,
"sha": "44b4fc6d56897b048c772eb4087f854f46256132",
"url": "https://api.github.com/repos/octocat/Hello-World/git/blobs/44b4fc6d56897b048c772eb4087f854f46256132"
},
{
"path": "subdir",
"mode": "040000",
"type": "tree",
"sha": "f484d249c660418515fb01c2b9662073663c242e",
"url": "https://api.github.com/repos/octocat/Hello-World/git/blobs/f484d249c660418515fb01c2b9662073663c242e"
},
{
"path": "exec_file",
"mode": "100755",
"type": "blob",
"size": 75,
"sha": "45b983be36b73c0788dc9cbcb76cbb80fc7bb057",
"url": "https://api.github.com/repos/octocat/Hello-World/git/blobs/45b983be36b73c0788dc9cbcb76cbb80fc7bb057"
}
]
}
Get a Tree Recursively
GET /repos/:owner/:repo/git/trees/:sha?recursive=1
Response
Status: 200 OK
X-RateLimit-Limit: 5000
X-RateLimit-Remaining: 4999
{
"sha": "fc6274d15fa3ae2ab983129fb037999f264ba9a7",
"url": "https://api.github.com/repos/octocat/Hello-World/trees/fc6274d15fa3ae2ab983129fb037999f264ba9a7",
"tree": [
{
"path": "subdir/file.txt",
"mode": "100644",
"type": "blob",
"size": 132,
"sha": "7c258a9869f33c1e1e1f74fbb32f07c86cb5a75b",
"url": "https://api.github.com/repos/octocat/Hello-World/git/7c258a9869f33c1e1e1f74fbb32f07c86cb5a75b"
}
]
}
Create a Tree
The tree creation API will take nested entries as well. If both a tree and a nested path modifying that tree are specified, it will overwrite the contents of that tree with the new path contents and write a new tree out.
POST /repos/:owner/:repo/git/trees
Parameters
Name | Type | Description |
---|---|---|
tree |
array of hash es |
Required. Objects (of path , mode , type , and sha ) specifying a tree structure |
base_tree |
string |
The SHA1 of the tree you want to update with new data. If you don’t set this, the commit will be created on top of everything; however, it will only contain your change, the rest of your files will show up as deleted. |
The tree
parameter takes the following keys:
Name | Type | Description |
---|---|---|
path |
string |
The file referenced in the tree |
mode |
string |
The file mode; one of 100644 for file (blob), 100755 for executable (blob), 040000 for subdirectory (tree), 160000 for submodule (commit), or 120000 for a blob that specifies the path of a symlink |
type |
string |
Either blob , tree , or commit
|
sha |
string |
The SHA1 checksum ID of the object in the tree |
content |
string |
The content you want this file to have. GitHub will write this blob out and use that SHA for this entry. Use either this, or tree.sha . |
Input
{
"base_tree": "9fb037999f264ba9a7fc6274d15fa3ae2ab98312",
"tree": [
{
"path": "file.rb",
"mode": "100644",
"type": "blob",
"sha": "44b4fc6d56897b048c772eb4087f854f46256132"
}
]
}
Response
Status: 201 Created
Location: https://api.github.com/repos/:owner/:repo/git/trees/:sha
X-RateLimit-Limit: 5000
X-RateLimit-Remaining: 4999
{
"sha": "cd8274d15fa3ae2ab983129fb037999f264ba9a7",
"url": "https://api.github.com/repos/octocat/Hello-World/trees/cd8274d15fa3ae2ab983129fb037999f264ba9a7",
"tree": [
{
"path": "file.rb",
"mode": "100644",
"type": "blob",
"size": 132,
"sha": "7c258a9869f33c1e1e1f74fbb32f07c86cb5a75b",
"url": "https://api.github.com/repos/octocat/Hello-World/git/blobs/7c258a9869f33c1e1e1f74fbb32f07c86cb5a75b"
}
]
}
This website is a public GitHub repository. Please help us by forking the project and adding to it.