Skip to content

Commit

Permalink
Merge pull request #1011 from Rafi993/master
Browse files Browse the repository at this point in the history
git cat-file -p master^{tree} in other shells
  • Loading branch information
ben authored Mar 16, 2018
2 parents e17ba13 + e229d1d commit 96cb0a9
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions book/10-git-internals/sections/objects.asc
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,15 @@ $ git cat-file -p 99f1a6d12cb4b6f19c8655fca46c3ecf317074e0
100644 blob 47c6340d6459e05787f644c2447d2595f5d3a54b simplegit.rb
----

[NOTE]
====
Depending on what shell you use, you may encounter errors when using the `master^{tree}` syntax.
In PowerShell or CMD on Windows, the `^` character is used for escaping, so you have to double it to avoid this: `git cat-file -p mater^^{tree}`.
If you're using ZSH, the `^` character is used for globbing, so you have to enclose the whole expression in quotes: `git cat-file -p "master^{tree}"`
====

Conceptually, the data that Git is storing looks something like this:

.Simple version of the Git data model.
Expand Down

0 comments on commit 96cb0a9

Please sign in to comment.