V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX 提问指南
GirliOS
V2EX  ›  问与答

如何较为精确地统计自己一段时间(比如一个月,一年)的代码量?

  •  
  •   GirliOS · 2014-04-11 21:08:00 +08:00 · 2996 次点击
    这是一个创建于 3659 天前的主题,其中的信息可能已经有所发展或是发生改变。
    4 条回复    1970-01-01 08:00:00 +08:00
    loading
        1
    loading  
       2014-04-11 21:17:11 +08:00 via iPhone
    使用git,每天提交一下
    Seita
        2
    Seita  
       2014-04-11 21:17:17 +08:00
    Github……
    YouXia
        3
    YouXia  
       2014-04-11 21:44:34 +08:00   ❤️ 1
    find -name "*.cpp" | xargs wc -l
    xi4oh4o
        4
    xi4oh4o  
       2014-04-11 22:49:05 +08:00
    git log --author="$(git config --get user.name)" --pretty=tformat: --numstat --since=1am \
    | gawk '{ add += $1 ; subs += $2 ; loc += $1 - $2 } END { printf "added lines: %s removed lines : %s total lines: %s\n",add,subs,loc }'

    改改since
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   5351 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 28ms · UTC 08:01 · PVG 16:01 · LAX 01:01 · JFK 04:01
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.