WinWin
WinWin

Reputation: 7743

pushed git repository missing branch & tag names on gitk

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?

Upvotes: 2

Views: 1047

Answers (2)

Andy
Andy

Reputation: 46444

To push the tags, you need to add --tags to your push.

By default you only pushed the master branch.
To push individual branches (with tags) do git push ~/gitrepo branchname --tags To push all branches do git push --all. Do a separate git push --tags if 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

Upvotes: 6

Adam Dymitruk
Adam Dymitruk

Reputation: 129624

You need to do a separate push with the --tags option. Secondly, you should be calling gitk with the --all option to show all branches. Or you could just specify the ones you want.

Upvotes: 1

Related Questions