I have the following tree:
O---O---O---O <- master
\--O---O <- work branch
/\
||
TAG
When I run git cat-file I get an error:
> git cat-file tag TAG
fatal: git cat-file TAG: bad file
Do anyone has an idea what is wrong here?
What do you expect to happen? Perhaps you want:
… which prints some information about the commit that
TAGpoints to. (i.e. the<type>thatgit cat-fileis expecting should becommitrather thantag.)Update: as I mentioned in a comment below, if what you want is the object name (the hash) of the commit, you can get that with: