GirliOS
V2EX  ›  问与答

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

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