Skip to main content
  1. Learn
  2. Software Development
  3. Guides
  4. Git tutorial
  5. 如何使用 Git
  6. 如何在 Command Line 中使用 Git
  7. 從克隆的儲存庫推送
GuidesSoftware DevelopmentBacklog
Git

Project and code management together.

從克隆的儲存庫推送

接下來,我們現在可以從我們剛才創建的克隆儲存庫中推送。

首先,將下面的粗體文本新增到剛才克隆目錄中的sample.txt,並提交更改。

Anyone can learn Git with this tutorial and Backlog add: Register a change in an index

$ git add sample.txt
$ git commit -m "append description of the add command"
  [main 1ef5c8c] append description of the add command
  1 files changed, 1 insertions(+), 1 deletions(-)

現在使用 git push 指令將新提交推送到遠端儲存庫。

在克隆的儲存庫目錄中執行推送時,可以省略儲存庫和分支名稱。

$ git push
  Username: <username>
  Password: <password>
  Counting objects: 5, done.
  Delta compression using up to 4 threads.
  Compressing objects: 100% (2/2), done.
  Writing objects: 100% (3/3), 351 bytes, done.
  Total 3 (delta 0), reused 0 (delta 0)
  To https://example.backlog.com/git/BLGGIT/tutorial.git
      486789c..1ef5c8c  main -> main

您現在將在 Backlog 上找到新推送的提交。它將列在 Backlog 的 Git 頁面上的「Recent Updates」下。

The commit you have just pushed has been added to the lastest update.

Subscribe to our newsletter

Learn with Nulab to bring your best ideas to life