I just did my first ever git push:
~/sb/ws> git push ~/gitrepo master:master
Counting objects: 1360, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (998/998), done.
Writing objects: 100% (1360/1360), 342.15 KiB | 20 KiB/s, done.
Total 1360 (delta 729), reused 0 (delta 0)
To /home/gitrepo
* [new branch] master -> master
It seems to have gone well, but when fire gitk in the new (bare) gitrepo, I only see the commit comments: The branch & tag names disappeared!
Why?
Is there a way to get them back?
To push the tags, you need to add
--tagsto your push.By default you only pushed the master branch.
To push individual branches (with tags) do
git push ~/gitrepo branchname --tagsTo push all branches do
git push --all. Do a separategit push --tagsif you want to push all tags.Here’s a post on how to default to pushing all branches.
edit: Added info from Winwin’s comments