git 安装与使用
Git官网
git说明
https://mp.weixin.qq.com/s/Bf7uVhGiu47uOELjmC5uXQ
删除 git: 1、控制面板 > 卸载git 2、删除 git 环境变量
配置文件:
git config --global user.name "名字"
git config --global user.emial "邮箱"
在 c盘/用户 的文件夹里有一个 .gitconfig 文件,里面是配置好
[core]
editor = \"C:\\APP\\vscode\\install\\Microsoft VS Code\\bin\\code\" --wait
[user]
name = xx
email = xxx@xx.com
查看git配置 git config -l
diff.astextplain.textconv=astextplain
filter.lfs.clean=git-lfs clean -- %f
filter.lfs.smudge=git-lfs smudge -- %f
filter.lfs.process=git-lfs filter-process
filter.lfs.required=true
http.sslbackend=openssl
http.sslcainfo=D:/App/Git/install/Git/mingw64/ssl/certs/ca-bundle.crt
core.autocrlf=true
core.fscache=true
core.symlinks=false
pull.rebase=false
credential.helper=manager-core
credential.https://dev.azure.com.usehttppath=true
init.defaultbranch=master
core.editor="C:\APP\vscode\install\Microsoft VS Code\bin\code" --wait
user.name=xxx
user.email=xxx@xxx.com
查看系统配置 git config --system --list
diff.astextplain.textconv=astextplain
filter.lfs.clean=git-lfs clean -- %f
filter.lfs.smudge=git-lfs smudge -- %f
filter.lfs.process=git-lfs filter-process
filter.lfs.required=true
http.sslbackend=openssl
http.sslcainfo=D:/App/Git/install/Git/mingw64/ssl/certs/ca-bundle.crt
core.autocrlf=true
core.fscache=true
core.symlinks=false
pull.rebase=false
credential.helper=manager-core
credential.https://dev.azure.com.usehttppath=true
init.defaultbranch=master
查看当前用户配置 git config --global --list
core.editor="C:\APP\vscode\install\Microsoft VS Code\bin\code" --wait
user.name=xx
user.email=xx@xx.com
git 基本理论(核心) 提交 1、本地工作区文件通过 git add 提交到暂存区 2、暂存区文件通过 git commit提交到本地仓库 3、本地仓库文件通过git push 提交到远程仓库
下拉 1、远程仓库文件通过git pull下拉到本地仓库 2、本地仓库文件通过git reset回滚到暂存区 3、暂存区文件通过git checkout剪出到本地工作区文件夹
运行 1、git inti 初始化 此时会有一个隐藏目录 .git 文件夹 
1、生成/添加SSH公钥
https://gitee.com/help/articles/4181#article-header0
2、登录gitee,打开个人中心 > 安全设置 > 添加SSH公钥
# 列出所有本地分支
git branch
# 列出所有远程分支
git branch -r
# 新建一个分支,但依然停留在当前分支
git branch [branch-name]
# 新建一个分支,并切换到该分支
git checkout -b [branch]
# 合并指定分支到当前分支
$ git merge [branch]
# 删除分支
$ git branch -d [branch-name]
# 删除远程分支
$ git push origin --delete [branch-name]
$ git branch -dr [remote/branch]
|