git - How to get the SHA of commit from diff output? -


how can sha of commit diff output?

for example diff binary file, output of git show commit is:

diff --git a/0_prospektusok/far_feltetdiszek/feltetdisz_prospektus.xls b/0_prosp index 9993010..707c169 100644 binary files a/0_prospektusok/far_feltetdiszek/feltetdisz_prospektus.xls , b/0 

the git show 9993010 shows file on terminal, if redirecting file , opening ms excel, contains junk.

the git checkout 9993010 says fatal: reference not tree: 9993010.

how can checkout versions of a , b?

if want checkout whole repo before commit use git checkout commit~.
if want keep working copy , update file state had before commit, use git checkout commit~ -- 0_prospektusok/far_feltetdiszek/feltetdisz_prospektus.xls.
explanation why git checkout 9993010 didn't work, read answer how "index f2e4113..d4b9bfc 100644" in git diff correspond sha1 id in gitk?


Comments

Popular posts from this blog

javascript - How to get current YouTube IDs via iMacros? -

c# - Maintaining a program folder in program files out of date? -

emulation - Android map show my location didn't work -