Git的基本操作:
只要操作git 最前面 都需要写git

克隆隆远程代码仓库:git clone 远程代码仓库的地址
版本管理工具
Git
SVN
⽬的:协同开发 -> 公共的仓库(所有人的代码都放 到这个里面)-> 可以版本回滚 、写每次提交的注释 自动合并代码

版本管理理工具 Git
操作:
1. 创建 初始化 公共的代码仓库
2. 把远程代码仓库 迁移到本地 (本地和远程会互 相对应)
3. 更新、提交代码文件
码云(github):是⼀一个部署在外网的一个 Git的环 境
1. 创建 初始化 公共的代码仓库


2. 把远程代码仓库 迁移到本地 (本地和远程会互 相对应)
需要知道远程代码仓库的地址

迁移步骤:
1. 复制远程代码仓库地址
如:https://gitee.com/liuyujing/god_of_thunder.git
2.打开终端

3.切换到 要迁移的位置
Cd 空格 文件夹的位置 -> 按enter键 会切换到这个 文件夹

4. 在终端中 输入 git clone https://gitee.com/ liuyujing/god_of_thunder.git

5. 切换目录到 本代码仓库
cd 本地代码仓库的地址

6. 添加文件到缓存
Git 空格 add 空格 . 添加所有文件 到git 的缓存

7. 填写本次提交的注释:
git 空格 commit 空格-m”注释的信息”

8.推送到远程代码仓库
git 空格 push
远程代码仓库中 就有咱们添加的文件了
如果提示输入用户名密码 输入即可

网友评论