doggy8088 / Learn-Git-in-30-days

這是 Will 保哥在 2013 第 6 屆 iT 邦幫忙鐵人賽年度大獎的得獎著作【30 天精通 Git 版本控管】,歡迎大家 fork 我,如果有看見任何文字勘誤,也歡迎利用 pull request 來通知我修正,謝謝!
http://doggy8088.github.io/Learn-Git-in-30-days/
3.95k stars 1.98k forks source link

「本地追蹤分支」就是如下圖紅字的部分 #8

Closed hcchengithub closed 9 years ago

hcchengithub commented 9 years ago

Thank you so muhc. Q: 依您附圖,紅色部分都是 remotes .... 怎麼會是「_本地_追蹤分支」?

YueLinHo commented 9 years ago

More note: it is on day 25.

Pro Git 3.5

Remote Branches
Remote branches are references (pointers) to the state of branches in your remote repositories. 
They’re local branches that ...

中文版 Pro Git 3.5

遠端分支
遠端分支(remote branch)是對遠端倉庫中的分支的索引。
它們是一些無法移動的本地分支...

重點在於: 雖然是用 remotes 字眼做 prefix, 但它們存在於 本地(實際上是一種 local branches) 它的特性是要標示遠端的版本庫有一個本地分支, 你可以這樣子想它: remotes/origin/master -> 遠端(remotes)版本庫(給它取名叫origin)有一個master分支

假設, 遠端版本庫有一個本地分支叫 abc 你clone時, 本地版本庫為了記錄遠端版本庫有個 abc 指到某個 commit 上, 會在本地版本庫會產生一個 remotes/origin/abc, 並同時也指向那個 commit 上 當你在本地版本庫的這個 commit 上, 或者 remotes/origin/abc 上產生一個本地分支 abc 時, 本地版本庫的本地分支 abc 和 remotes/origin/abc 之間會自動產生一個 "追蹤" 闗係

更詳盡的 "跟蹤" 的概念, 請參考 這裡 當一個本地分支(master)與遠端分支(remotes/origin/master)之間有 "跟蹤" 關係時, 才會用這個詞

hcchengithub commented 9 years ago

拜謝,真的太感動了! 懇請在您的教材上提供 donation 訊息。

陳厚成 敬上

2015-04-11 17:12 GMT+08:00 Yue Lin Ho notifications@github.com:

More note: it is on day 25.

Pro Git 3.5 http://git-scm.com/book/en/v2/Git-Branching-Remote-Branches

Remote Branches Remote branches are references (pointers) to the state of branches in your remote repositories. They’re local branches that ...

中文版 Pro Git 3.5 http://git-scm.com/book/zh-tw/v1/Git-%E5%88%86%E6%94%AF-%E9%81%A0%E7%AB%AF%E5%88%86%E6%94%AF

遠端分支 遠端分支(remote branch)是對遠端倉庫中的分支的索引。 它們是一些無法移動的本地分支...

重點在於: 雖然是用 remotes 字眼做 prefix, 但它們存在於 本地(實際上是一種 local branches) 它的特性是要標示遠端的版本庫有一個本地分支, 你可以這樣子想它: remotes/origin/master -> 遠端(remotes)版本庫(給它取名叫origin)有一個master分支

假設, 遠端版本庫有一個本地分支叫 abc 你clone時, 本地版本庫為了記錄遠端版本庫有個 abc 指到某個 commit 上, 會在本地版本庫會產生一個 remotes/origin/abc, 並同時也指向那個 commit 上 當你在本地版本庫的這個 commit 上, 或者 remotes/origin/abc 上產生一個本地分支 abc 時, 本地版本庫的本地分支 abc 和 remotes/origin/abc 之間會自動產生一個 "追蹤" 闗係

更詳盡的 "跟蹤" 的概念, 請參考 這裡 http://git-scm.com/book/zh-tw/v1/Git-%E5%88%86%E6%94%AF-%E9%81%A0%E7%AB%AF%E5%88%86%E6%94%AF#%E8%B7%9F%E8%B9%A4%E9%81%A0%E7%AB%AF%E5%88%86%E6%94%AF 當一個本地分支(master)與遠端分支(remotes/origin/master)之間有 "跟蹤" 關係時, 才會用這個詞

— Reply to this email directly or view it on GitHub https://github.com/doggy8088/Learn-Git-in-30-days/issues/8#issuecomment-91797074 .

Just undo it! 陳厚成 H.C. Chen 3-words-engine Forth http://github.com/hcchengithub/jeforth.3we eforth64 https://github.com/hcchengithub/eforth-x86-64bits Old school F language https://github.com/hcchengithub/F-Language

YueLinHo commented 9 years ago

拜謝,真的太感動了!

客倌! 其實我只是路人一枚 不用太感動啦~~ 有緣的話, 咱們就交個朋友! ^_^

懇請在您的教材上提供 donation 訊息。

這個 Learn-Git-in-30-days 不是我寫的, 是 @doggy8088 寫的, 你可以找他 Pro Git 也不是我寫的, 主要作者是 @schacon, @jnavila, 你可以找他們 如果你還要其它 donation 訊息, 那就 TortoiseGit 吧! 在 這裡