工具箱1:git操作
1、Git 需标识提交者身份,全局配置(所有仓库生效):
# 配置用户名(替换为你的名称) git config --global user.name "Your Name" # 配置邮箱(替换为你的邮箱,建议与 GitHub/Gitee 一致) git config --global user.email "your.email@example.com"
- 若需为单个仓库配置不同信息,去掉
--global,进入仓库后执行命令。 - 查看配置:
git config --list
2、rebase操作
# 对commit-id进行调整,危险操作 git rebase -i commit-id
3、proxy使用
git config --global http.proxy url git config --global https.proxy url git config --global --unset http.proxy git config --global --unset https.proxy
4、全局禁用 Git 的 HTTPS 证书验证
git config --global http.sslVerify false
5、git支持长路径
git config --global core.longpaths true
6、git mm
# 下载credential认证插件 git mm credential install # 如果配置出错,可以使用该命令清除credential配置 git mm credential --clean # 存储认证信息 git mm credential --store -u='工号' -p='密码' git mm init -u ssh-url git mm sync git mm start develop --all
开发常用工具箱(杂) 文章被收录于专栏
git docker ubuntu shell gdb