GirliOS
V2EX  ›  问与答

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

  •  
  •   GirliOS · Apr 11, 2014 · 4272 views
    This topic created in 4601 days ago, the information mentioned may be changed or developed.
    4 replies  •  1970-01-01 08:00:00 +08:00
    loading
    loading
    Apr 11, 2014 via iPhone
    1
    使用git,每天提交一下
    Seita
    Seita
    Apr 11, 2014
    2
    Github……
    YouXia
    YouXia
    Apr 11, 2014❤️1
    3
    find -name "*.cpp" | xargs wc -l
    xi4oh4o
    xi4oh4o
    Apr 11, 2014
    4
    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
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   2078 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 26ms · UTC 14:35 · PVG 22:35 · LAX 06:35 · JFK 09:35
    ♥ Do have faith in what you're doing.