從複製的儲存庫推送
接下來,我們現在可以從我們剛才創建的複製儲存庫中推送。
首先,將下面的粗體文本新增到剛才克隆目錄中的sample.txt
檔案,並提交更改。
Anyone can learn Git with this tutorial and Backlog
add: Register a change in an index
當您本地儲存庫分支的歷史日誌更新時,它會領先於遠端儲存庫分支。

現在將新提交推送到遠端儲存庫。
右鍵單擊「tutorial2」目錄,然後單擊「Push」。

單擊「OK」進入下一個螢幕。
再次單擊「OK」。

下面螢幕顯示正在進行的推送。完成後,單擊「Close」結束。

從右鍵單擊選單中選取「TortoiseGit」 > 「Show log」。現在main
和origin/main
處於同一級別。這意味著遠端儲存庫現在已更新為最新更改,並與本地儲存庫同步。
您現在將在 Backlog 的 Git 頁面上的「Recent Updates」下找到最新推送的提交。

在下一個章節,我們將更詳細地介紹分支,但現在這是以下每個參考指向的位置:
- origin/main:指向
origin
的主要分支,通常是遠端儲存庫。 - origin/HEAD:指的是
origin
的目前提交,即遠端儲存庫。在大多數情況下,本地儲存庫在執行克隆時將指向與origin/HEAD
相同的位置 (相當於origin/main
)。但是,如果您退出到不同的遠端分支,情況就不會如此。 - main:指向本地儲存庫的主分支。