统计git每周提交代码(初略)
第一步
使用 git log 查看 两次提交的 commit id
$ git log --author="xxxx" --since='2020-05-29' --until='2020-05-30'
commit 3d1b3c283008b43d7c07f95bea397a8635c7cd6f (HEAD -> master, origin/master)
Author: xxxx<blackaiyyblnl@gmail.com>
Date: Sat May 30 09:42:57 2020 +0800
修改格式问题
commit d9adc464a717fd82165cf40d8418c4ca7f7fb325
Merge: 314f563 e2f499e
Author: xxxx<blackaiyyblnl@gmail.com>
Date: Fri May 29 18:00:50 2020 +0800
Merge branch 'master' of git.gygxzc.cn:yaopeng/ZHZAWGHXT-web
commit 314f5631e7f9ddc4c73c2f9ef4314150aa4aa7a4
Author: xxxx<blackaiyyblnl@gmail.com>
Date: Fri May 29 18:00:46 2020 +0800
每日提交
第二步(此统计为非准确统计)
通过 git diff commit-id-1 commit-id-2 | grep ‘^+[ ^+].*’ > fileName 比较不同,过滤非新增代码,并输出到文件,输出大概如下:
+export function updateClassifyFun(data) {
+ return axios({
+ url: '/collect/df-model-classify-entity',
+ method: 'put',
+ data: data,
+ headers: {
+ +export function auditModel(parameter) {
+ return axios({
+ url: '/collect/df-model-audit-log-entity/audit',
+ method: 'put',
+ data: parameter,
+ headers: {
+ 'Content-Type': 'application/json;charset=UTF-8'
+ }
+ })
+}