Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

4
  • I tried this, like I mentioned above. This is what happens: <br/> @precise32:~/gs$ git cat-file -p .git/objects/1b/2a93ec2d9f68e802d5d106983a395b368f0d36 fatal: Not a valid object name .git/objects/1b/2a93ec2d9f68e802d5d106983a395b368f0d36`
    – killjoy
    Commented Apr 22, 2015 at 19:41
  • just the SHA no path. git cat-file -p 1b2a93ec2d9f68e802d5d106983a395b368f0d36
    – CodeWizard
    Commented Apr 22, 2015 at 21:04
  • <br/> ~/gs/.git/objects/a5$ ls bce3fd2565d8f458555a0c6f42d0504a848bd5 <br/> ~/gs/.git/objects/a5$ git cat-file -p bce3fd2565d8f458555a0c6f42d0504a848bd5 <br/> fatal: Not a valid object name bce3fd2565d8f458555a0c6f42d0504a848bd5
    – killjoy
    Commented Apr 23, 2015 at 19:19
  • you need 40 characters. 2 are the folder name and 38 are the file name if you take it from the .git folder. If you have the id from git ls-tree -s then you already have the full id.
    – CodeWizard
    Commented Apr 23, 2015 at 19:48