|
|
|
|
|
by mtdewcmu
4572 days ago
|
|
It looks like .git/logs contains the history. It looks like the file format is a space-separated list, with the format "$parentcommitsha1 $newcommitsha1 ... $commitmessage". That's fairly comprehensible. What are the SHA-1 sums of? Are they of the entire snapshot, or the delta? I went into objects/ and ran `sha1sum $objfile`, and the sum did not match the file name. So that remains obscure. `file $objfile` could not identify the format; it gave nonsense. Thanks for the help. >One of those meta-data items is "Parent Commit," so if you change one item in history, it changes the SHA-1 sum of all subsequent items (because at the very least they all need to be re-parented). What sequence of operations would change a history item in that way? |
|
I've never looked at .git/logs, but it looks like that is used by the `git reflog` command. It's basically a history (or log) of every commit that a particular reference has pointed to[1]. For example, I cloned the git source code:
Note: `HEAD` is a reference to the current branch. E.g.: It's also of note that branches are referred to as 'references' too, hence storing them under `.git/refs/`.> What are the SHA-1 sums of? Are they of the entire snapshot, or the delta? I went into objects/ and ran `sha1sum $objfile`, and the sum did not match the file name. So that remains obscure.
See: http://stackoverflow.com/questions/5290444/why-does-git-hash...
[1]: Since the local repository was created. This information does not sync between local and remote.