git 相关

查看 config 文件路径
git config --list --show-origin
global -> system -> local
后面的覆盖前面的配置
git config --global user.name "John Doe"
git config --global user.email johndoe@example.com
git ls-files 显示add的文件列表
git clean -d -i //清楚本地的文件
ssh 免密配置 ssh-keygen -t rsa -C “备注”
ssh 多配置看书签记录
然后上传pub公钥,起个名字
git checkout -》进入某个分支版本
git branch xxxx -》创建某个分支
git branch -d xxxx -> 删除某个分支
git checkout -b branchname <SHA1> 某一历史版本
git merge xxxx -》合并
远程创建
git remote add origin https://git.coding.net/codecore/ufun_core_test.git
workdir -》stage -》commit ==》remote
reset -soft
| 命令 | 作用 |
|---|---|
| git reset –soft | 暂存区->工作区 |
| git reset –mixed | 版本库->暂存区 |
| git reset –hard | 版本库->暂存区->工作区 |
三个区的说明 https://blog.csdn.net/qq_32452623/article/details/78417609


浙公网安备 33010602011771号