git统计提交记录中修改过的文件
使用git的log命令
1 | start_commit_id 起始提交ID |
只显示文件
pretty
必须为空
1 | 显示commit_id和文件 |
使用git的log命令
1 | start_commit_id 起始提交ID |
只显示文件
pretty
必须为空
1 | 显示commit_id和文件 |
在windows上git clone代码时报错:error: invalid path ‘xxxx’
解决方法:
1 | git config core.protectNTFS false |
参数说明:
1 | core.protectNTFS |
git使用过程中,出现error: unable to create file xxx: Filename too long Updated 0 paths from the index
原因是windows的git版本中如果是文件名太长了,git会报错
解决方法:
1 | 选其一 |
git仓库使用很长一段时间后,因为提交次数多了.git
目录会越来越大;导致构建检出tag
时耗时特别长。
整理了清理git仓库方法
下载地址:https://github.com/rtyley/bfg-repo-cleaner
使用步骤:
下载bfg,是一个jar文件,需求安装java
环境才能执行
清理命令
1 | 清理>10M的文件 |
进入仓库目录,执行
1 | cd your-git-repo-path |
漫长的等待过后,推送到远程
1 | git push --force |
自已的项目可以像这样搞,如果是多人使用的仓库,最好是清理后迁移成一个新仓库,然后所有人重新clone
git拉代码失败,不提示输入账号密码,出现The requested URL returned error: 403
解决方法,清除密码缓存
1 | git config --local --unset credential.helper |
之后就可以重新输入账号密码拉代码了