添加推送到远程仓库的步骤说明
parent
dbb4d010a5
commit
53c99213c1
21
Home.md
21
Home.md
|
@ -1,5 +1,26 @@
|
||||||
这是我第一次使用版本控制,我要记录一下自己的使用过程。
|
这是我第一次使用版本控制,我要记录一下自己的使用过程。
|
||||||
|
|
||||||
|
### 问题清单
|
||||||
|
|
||||||
|
#### 如何把本地的仓库推送到远程仓库?
|
||||||
|
|
||||||
|
首先运行`git remote add <shortname> <url>`添加远程仓库
|
||||||
|
|
||||||
|
```shell
|
||||||
|
git remote add origin git@git.suneshone.com:suneshone/obscuredSubtitles.git
|
||||||
|
```
|
||||||
|
|
||||||
|
可以通过运行 `git remote` 命令列出你指定的每一个远程服务器的简写,你也可以指定选项 `-v`,会显示需要读写远程仓库使用的 Git 保存的简写与其对应的 URL。
|
||||||
|
|
||||||
|
然后运行 `git push <remote> <branch>`将本地仓库推送到远程仓库
|
||||||
|
|
||||||
|
比如将 master 分支推送到 origin 服务器
|
||||||
|
|
||||||
|
```shell
|
||||||
|
git push origin master
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
### git安装
|
### git安装
|
||||||
|
|
||||||
1. [下载git](https://git-scm.com/),阅读[书籍](https://git-scm.com/book/zh/v2)。
|
1. [下载git](https://git-scm.com/),阅读[书籍](https://git-scm.com/book/zh/v2)。
|
||||||
|
|
Loading…
Reference in New Issue