GitHub 网址:https://github.com/
目录
1、创建远程仓库
2、远程仓库操作
2.1、创建远程仓库别名
2.2、推送本地分支到远程仓库
2.3、拉取远程仓库到本地
2.4、克隆远程仓库到本地
2.5、SSH 免密登录
1、创建远程仓库

注:远程仓库地址查看方式:

2、远程仓库操作
命令名称 | 作用 | git remote -v | 查看当前所有远程地址别名 | git remote add 别名 远程地址 | 起别名 | git push 别名 分支 | 推送本地分支上的内容到远程仓库 | git clone 远程地址 | 将远程仓库的内容克隆到本地 | git pull 远程库地址别名 远程分支名 | 将远程仓库对于分支最新内容拉下来后与当前本地分支直接合并 |
2.1、创建远程仓库别名
- 基本语法:
- git remote -v 查看当前所有远程地址别名
- git remote add 别名 远程地址
- 操作说明:
? ? ? ?1、为远程仓库起别名

???????2、查看当前所有远程地址别名

2.2、推送本地分支到远程仓库

2.3、拉取远程仓库到本地

2.4、克隆远程仓库到本地

????????1、拉取代码。2、初始化本地仓库。3、创建别名(自动命名为origin)
2.5、SSH 免密登录
????????1、进入系统用户文件,删除.ssh文件

????????2、重新生成密钥

????????3、复制 id_rsa.pub 文件内容,登录 GitHub,点击用户头像→Settings→SSH and GPG keys


????????4、添加密钥
- Title可以随意取
- Key中填写生成的id_rsa.pub文件中的内容

? ? ? ? 5、配置成功,使用SSH链接进行操作

|