git命令行下怎么查看当前分支是基于哪一个分支的,以决定是否可以执行git rebase,有没有命令可以列出一个分支的树型结构?

2013 年 9 月 30 日
 tangzs
谢谢哈
56925 次点击
所在节点    Linux
13 条回复
jianghu52
2013 年 9 月 30 日
第一个问题不知道答案,而且我觉得你这个问题比较容易混淆。因为当前的这个版本如果是master合并了其他分支之后得到的,你说他的属于master分支,还是其他分支呢。
第二个问题我也不知道命令,但是我能从gui的历史记录上看到分支的树形结构
lichao
2013 年 9 月 30 日
git branch ?
lichao
2013 年 9 月 30 日
@lichao 哦,不是这么回事儿
cadl
2013 年 9 月 30 日
git log --graph 会出现一个commit的图
pengphy
2013 年 9 月 30 日
git show-branch 可以看出分支上的递交状况
Golevka
2013 年 9 月 30 日
gitk不是也挺好用的么
rrrrutdk
2013 年 9 月 30 日
git log --graph --decorate --all
welsonla
2013 年 9 月 30 日
git branch -va
eggcaker
2013 年 9 月 30 日
tig
tangzs
2013 年 9 月 30 日
谢谢各位,试了一下感觉 @eggcaker 说的 tig 命令可能比较适合我。
halfelf
2013 年 10 月 1 日
lola = log --graph --decorate --pretty=oneline --abbrev-commit --all
pright
2013 年 10 月 10 日
git branch -vv
linuxqiao
2016 年 12 月 6 日
@halfelf 常用这个来检查自己的分支和 upstream 分支的状态。 +1

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://study.congcong.us/t/84206

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX