git-hash Questions

7

Solved

The SHA1 hashes stored in the tree objects (as returned by git ls-tree) do not match the SHA1 hashes of the file content (as returned by sha1sum): $ git cat-file blob 4716ca912495c805b94a88ef6dc3fb...
Isley asked 29/8, 2011 at 1:37

25

Solved

How do I get the hash of the current commit in Git?
Ersatz asked 4/6, 2009 at 8:42

12

Solved

I would like to include the current git hash in the output of a Python script (as a the version number of the code that generated that output). How can I access the current git hash in my Python s...
Tambratamburlaine asked 20/2, 2013 at 21:3

9

Solved

I am writing a script that requires checking whether a particular commit is a Merge/Revert commit or not, and I am wondering if there is a git trick for that. What I came up with so far (and I def...
It asked 29/9, 2010 at 17:3

2

Solved

If a Git commit hash has multiple tags associated with it and/or is the head of multiple branches, is there a good way to list all of them? I've looked through the options to git name-rev, git desc...
Biflagellate asked 21/6, 2020 at 21:47

2

Solved

I am confused with how a file's actual contents are stored in .git. For e.g. Version 1 is the actual text content in test.txt. When I commit (first commit) it to the repo, git returns a SHA-1 for ...
Bantling asked 10/6, 2017 at 17:2

2

Solved

I find it hard to wrap my head around how Git creates fully unique hashes that aren't allowed to be the same even in the first 4 characters. I'm able to call commits in Git Bash using only the firs...
Proximal asked 13/1, 2016 at 10:26

0

Let's say I want to write a small helper that allows to append some metadata to a repository in a way that can propagate to clones via refs. Simple example (a git-notes clone prototype that doesn't...
Calciferous asked 9/2, 2017 at 14:52

1

Solved

$ git describe --tags --long test-1-g3c31c73 \_ ??? The g3c31c73 doesn't seem to point to anything... The doc says it's the abbreviated object name of the most recent commit, but it's not the HE...
Turnabout asked 21/9, 2016 at 9:38
1

© 2022 - 2024 — McMap. All rights reserved.