提交檔案
我們將新增一個新檔案,並將其註冊在我們剛建立的儲存庫中。
使用下列文本內容在該目錄中建立一個名為sample.txt
的檔案。
Anyone can learn Git with this tutorial and Backlog
在 Sourcetree 的書籤窗口中雙擊tutorial
儲存庫,來彈出儲存庫操作視窗。如果目錄中有任何剛才新增或編輯的檔案,將顯示在工作目錄檔案檢查工具的左下角。
因為我們剛才將sample.txt
檔案新增到tutorial
目錄中,所以我們看到它列在那裡。

右鍵單擊「sample.txt」檔案,並選取「Add to Index」。該檔案將移動到上面的「Files staged in the index」清單中。

單擊工具列上的「Commit」圖示,輸入提交訊息 (例如,「first commit」),然後單擊「Commit」。

完成後,您將在「main」分支歷史紀錄中找到提交。您可以透過單擊左側選單中的「History」來驗證提交是否成功。

接下來,您已準備好與您的團隊共享儲存庫。