git cat-file -p master^{tree} in other shells#1011
Merged
ben merged 5 commits intoprogit:masterfrom Mar 16, 2018
Rafi993:master
Merged
git cat-file -p master^{tree} in other shells#1011ben merged 5 commits intoprogit:masterfrom Rafi993:master
ben merged 5 commits intoprogit:masterfrom
Rafi993:master
Conversation
usage of git cat-file -p master^{tree} command in other shells as specified in this answer https://stackoverflow.com/a/17121954/2445295 thanks to @Mellbourn
ben
reviewed
Mar 6, 2018
| The `master^{tree}` syntax specifies the tree object that is pointed to by the last commit on your `master` branch. | ||
| Notice that the `lib` subdirectory isn't a blob but a pointer to another tree: | ||
|
|
||
| **NOTE**: while using `master^{tree}` syntax if you have error try the following |
Member
There was a problem hiding this comment.
Instead of just setting this in bold-face, let's use the Asciidoc "note" feature:
[NOTE]
====
(Note content goes here)
====This will render much nicer.
In addition, let's change the prose here to read like this:
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 master^^{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}"`.Or something like that. It's a bit more idiomatically English.
NOTE heading style changed and its content rephrased
ben
reviewed
Mar 7, 2018
| ==== | ||
| * 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}"` |
Member
list converted to single paragraph
ben
reviewed
Mar 8, 2018
|
|
||
| [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}"` |
Member
There was a problem hiding this comment.
Sorry, one more request: could you reformat this with one sentence on each source-code line? It makes reviewing PRs much easier in the future.
changed to one sentence on each source-code line
ben
reviewed
Mar 13, 2018
|
|
||
| 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}"` | ||
| ==== | ||
|
|
Member
There was a problem hiding this comment.
Contributor
Author
There was a problem hiding this comment.
Hope these formatting rules are defined somewhere so that people could just read and follow it.
note block moved below code block
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


usage of
git cat-file -p master^{tree} commandin other environments as specified in this answer https://stackoverflow.com/a/17121954/2445295 thanks to @Mellbourn