Skip to main content
  1. Learn center
  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