目录
1、Git 环境搭建
1.1 Git 配置正常显示中文文件名
git config --global core.quotepath off
2、Git 常用指令
2.1 Git 生成差异文件补丁包
git diff 0a3887ba 68172b4b --name-only | xargs zip update.zip
也可以用
git diff HEAD HEAD^ --name-only | xargs zip update.zip
2.2 Git 移除未纳入跟踪的文件
git clean -df
2.3 Git 选择性合并分支
git cherry-pick commit_id
2.4 GIT拉取指定分支到本地分支
例如: remotes/origin/y/test,命令如下:
git pull origin y/test
2.5 查找所有.a类型文件并压缩
find . -name "*.a" -exec zip files.zip {} +
2.6 忽略切分支时文件权限发生改变,提示的modify
git config core.filemode false