git使用方法
#下面是说明我们安装好Git后如何使用
#第一次使用 Git 的时候,会要求我们配置用户名和邮箱,用于表示开发者的信息
#注意空格事项
git config --global user.name "Your Name"
git config --global user.email "email@example.com"
#输入完之后 查看里面有没有自己输入的名字和邮箱,有则配置成功
git config -l
#下面依次进行
1、git init 初始化,创建本地仓库
2、git add . 添加到本地仓库
3、git commit -m "注释" 添加注释
4、git remote add origin 仓库地址 连接远程仓库
5、git pull --rebase origin master 同步仓库内容
6、git push -u origin master 上传到远程仓库
分支是 Git 重要的功能特性之一,开发人员可以在主开发线的基础上分离出新的开发线。branch
#基本操作
#创建分支
#name 为分支的名称
git branch name
#查看分支
git branch
#切换分支
git checkout name
#合并分支
git merge name
# 删除分支
git branch -d name
#创建并切换分支
git checkout -b name
#每次在切换分支前 提交一下当前分支

浙公网安备 33010602011771号