git 初始化配置
配置用户账号邮箱 记录开发者
git config --global user.name "Username"
git config --global user.email "Username@example.com"
查看git配置
git config --list
初始化仓库
git init
克隆仓库
git clone url(远程仓库地址)
git提交远程文件到操作
检查状态
git status
将文件加入仓库(本地暂存区)
git add .(.表示所有文件)
检查状态
git status
执行提交
git commit -m '备注信息'
拉取远程仓库跟心到本地分支
git pull url(远程仓库地址)
提交远程仓库
git push origin master
git 创建分支、查看分支
查看分支
git branch * 表示当前分支
查看远程分支
git branch -r
查看所有分支
git branch -a
创建分支
git branch 分支名
切换分支
git checkout 分支名
创建并切换分支
git checkout -b 分支名(-b 表示创建)
提交远程分支
git push origin 分支名
git合并
切换master分支
git checkout master
合并goods分支到master分支
git merge goodsv
拉取远程仓库更新到本地分支
git pull orgin master
提交远程分支
git pull origin master
提交远程分支
git push origin master
git非快速合并
git mege --no-ff goods