Where does Git store tags? I execute:
$ git tag
v0.1.0
v0.10.0
v0.11.0
But the directory .git/refs/tags
is empty. Where does Git s
While wnoise is correct when he stated that Git also stores tags in .git/packed-refs
following a git gc
operation, between "pack" points (meaning, between git gc
operations), Git creates unpacked commit objects and unpacked tags:
derek@derek-OptiPlex-960:~/Projects/test$ git tag
1
2
3
derek@derek-OptiPlex-960:~/Projects/test$ cat .git/packed-refs
# pack-refs with: peeled
55a87ab06897aca29285e58beb4e0de15af409fa refs/heads/master
89a6b171ee6d56bc3ce5a4cbd92c6a379594d974 refs/tags/1
55a87ab06897aca29285e58beb4e0de15af409fa refs/tags/2
derek@derek-OptiPlex-960:~/Projects/test$ ls .git/refs/tags
3
derek@derek-OptiPlex-960:~/Projects/test$
They can also be stored in .git/packed-refs