Skip to content

Commit

Permalink
整理「第 25 天」頁面的圖示超連結
Browse files Browse the repository at this point in the history
Signed-off-by: Yue Lin Ho <[email protected]>
  • Loading branch information
YueLinHo committed Sep 23, 2017
1 parent e9254c2 commit 55664d0
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 5 deletions.
Binary file added figures/25/01.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added figures/25/02.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added figures/25/03.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added figures/25/04.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added figures/25/05.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 5 additions & 5 deletions zh-tw/25.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@

我們以複製 jQuery 在 GitHub 上的專案為例,透過 `git clone https://github.com/jquery/jquery.git` 下載回來後,執行 `git branch -a` 指令,顯示出所有「本地分支」與「本地追蹤分支」。「本地追蹤分支」就是如下圖**紅字**的部分:

![image](https://f.cloud.github.com/assets/88981/1405811/8c59cc46-3d3f-11e3-9919-c71b5ccb87ca.png)
![image](../figures/25/01.png)

3. 本地分支

Expand Down Expand Up @@ -79,7 +79,7 @@

最後再用 `git fetch` 指令把完整的 jQuery 遠端儲存庫一併下載回來,完整的執行過程如下圖示:

![image](https://f.cloud.github.com/assets/88981/1408254/d9fa10d4-3d7e-11e3-9c36-677d2e54efcd.png)
![image](../figures/25/02.png)

你可以看到,我們事實上可以在一個 Git 工作目錄中,加入許多相關或不相關的遠端儲存庫,這些複製回來的**完整儲存庫**,都包含了這些儲存庫中的所有物件與變更歷史,這些 Git 物件隨時都可以靈活運用。不過,通常我們註冊多個遠端儲存庫的機會並不多,除非你想抓特其他團隊成員的版本庫回來查看內容。

Expand Down Expand Up @@ -126,7 +126,7 @@

我們要怎樣查詢遠端儲存庫到底有哪些分支呢?你可以執行 `git ls-remote``git ls-remote origin` 即可列出所有遠端分支:

![image](https://f.cloud.github.com/assets/88981/1408776/0cd78222-3d87-11e3-8f2f-ce6d664262fb.png)
![image](../figures/25/03.png)

如果你把 fetch 的 refspec 修改成以下這樣,那麼除了 `master` 以外的遠端分支,就不會被下載了!:

Expand Down Expand Up @@ -155,11 +155,11 @@

我們以 `https://github.com/doggy8088/frontend-tools.git` 這個遠端儲存庫為例,我複製下來後,預設就會有一個 `master` 本地分支,我嘗試建立一個 `FixForCRLF` 本地分支,直接透過 `git push` 無法推送成功,你必須輸入完整的 `git push origin FixForCRLF` 指令才能將本地分支推送上去,原因就出在你並沒有設定「本地分支」與「遠端儲存庫」之間的預設對應。

![image](https://f.cloud.github.com/assets/88981/1405857/0425ab54-3d41-11e3-953b-faa3fbe6cd8c.png)
![image](../figures/25/04.png)

要將**本地分支**建立起跟**遠端儲存庫**的對應關係,只要在 `git push` 的時候加上 `--set-upstream` 參數,即可將本地分支註冊進 `.git\config` 設定檔,之後再用 `git push` 就可以順利的自動推送上去。

![image](https://f.cloud.github.com/assets/88981/1405874/cd6e0c9a-3d41-11e3-843c-f1cc78a11cdf.png)
![image](../figures/25/05.png)

執行 `git push --set-upstream origin FixForCRLF` 的同時,會在 `.git\config` 設定檔增加以下內容:

Expand Down

0 comments on commit 55664d0

Please sign in to comment.