Git: 列出分支、查看歷史提交紀錄

Git

列出分支

列出 local(部份)分支(branch)。

git branch

如下圖,前面標註星號(*)且字體為綠色表示為所在分支。

Git:列出分支

列出 remote 所有分支。

git branch -r

Git:列出分支

列出 local 與 remote 所有分支。

git branch -a

如下圖,紅色字體部份是 remote 的分支,前面會標註「remotes」,加上 *(星號)表示是目前所在分支。

Git:列出分支

查看分支與其歷史提交紀錄

查看(部份)local 分支與其歷史提交紀錄。

git show-branch

查看 remote 分支與其歷史提交紀錄。

git show-branch -r

查看所有分支與其歷史提交紀錄。

git show-branch -a

Git:列出分支

等同於 Source Tree 的「History」。

Git:列出分支

References


git git branch Sourcetree

Summer Tang
Sponsored
Summer Tang 一對一諮詢
Summer|TSMC 主任工程師|擁有 15 年資深 Web 架構經驗,職涯歷經跨國頂尖企業與新創。專精於高流量企業級應用開發,核心技術涵蓋微前端、效能優化、測試自動化與 SEO。曾出版多本技術著作,並多次擔任 MOPCON、WebConf 等大型技術年會講者。
了解更多 →