开发者

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 compressio开发者_运维百科n 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 --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


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜