推送到远程存储库
让我们推送到您在本教程的开头时创建的本地存储库。
打开 Sourcetree 并双击“tutorial”存储库。
![Select tutorial repository](/static/0cc13328c7f40b695d8fd51df47d6bc8/5a190/01.png)
单击工具栏右侧的“Settings”按钮。
![Click the setting button at the right side in the tool bar on the repository operation screen](/static/c6f1bfe4ed2fbcf12a9e7ad0ec23e711/5a190/02.png)
单击“Add”。
![Click Add button](/static/a313d6f7a04856ecdbd03aed6fbb74b8/5a190/03.png)
输入以下内容:
- 远程名称:
origin
- URL/路径:您之前在 Backlog 中创建的远程存储库的 URL
![The URL of the remote repository you previously created in Backlog](/static/ff228501adc615bf4497bd7b9e4f574d/5a190/04.png)
单击“OK”。
![Enter the URL of the remote repository and click OK button](/static/87cbe5b3a7ba3d3c8e22dd07e31dc331/5a190/05.png)
远程存储库“origin”现在将显示在“remotes”列表中,我们可以开始将更改推送到 Backlog。
![origin was added](/static/39c808b4d397534952da1f28d6f5ef78/5a190/06.png)
如果您在控制台上,如果您在推送/拉取时省略了远程名称,在默认情况下将会使用“origin”远程存储库。这是因为惯例通常使用“origin”作为远程名称。
现在单击上方工具栏上的“Push”图标。
![Click the push button at the tool bar on the tutorial repository operation screen](/static/cb53429d1701cdb5eb3aa08e6e16f645/5a190/07.png)
选择“main”复选框,并单击“OK”。
![Click the OK button after check the check box of main](/static/808477d9e97f15038c6cd02c5c38ebf0/5a190/08.png)
成功完成推送后,“origin/main”—代表远程提交—将显示在提交的“description”栏中。
![The origin/main shown by the remote repository has been added](/static/11b00e837933b61f41282d1fc361dd21/5a190/09.png)
打开 Backlog 上的 Git 页面,您会发现在“Recent Updates”下面,列出了一个与您推送到远程存储库相对应的最新更新。
![The push item is added to the recent updates.](/static/db1065bee8462ca92acbf77f301de80a/5a190/10.png)
推送的文件也会出现在远程存储库的文件列表中。
![The file from the pushed repository is added.](/static/24c9298d0a66bdd953826916280add0b/5a190/11.png)
接下来,我们将克隆这个远程存储库。