зеркало из
https://github.com/iharh/notes.git
synced 2025-11-05 16:16:09 +02:00
39 строки
647 B
Plaintext
39 строки
647 B
Plaintext
check git-hashes.txt here
|
|
|
|
git show
|
|
show commits
|
|
|
|
git show <hash>
|
|
show a WHOLE commit (or something else) of the hash
|
|
git show <hash>:FILE
|
|
.. just a specific FILE
|
|
|
|
REF:FILE
|
|
blob spec
|
|
:0:FILE
|
|
index (staging area)
|
|
:1:FILE
|
|
common ancestor, find by a merge base
|
|
:2:FILE
|
|
target (on a current branch that you're on)
|
|
:3:FILE
|
|
the one you're bringing in (with merge)
|
|
|
|
|
|
show <some-branch>:<file>
|
|
show a <file> from <some-branch> without switching to it
|
|
|
|
samples:
|
|
|
|
# HEAD
|
|
$ git show HEAD:path/to/file
|
|
|
|
# INDEX
|
|
$ git show :path/to/file
|
|
|
|
# local
|
|
$ git show <branch>:path/to/file
|
|
|
|
# remote
|
|
$ git show origin/master:path/to/file
|