LoginSignup
54
50

More than 5 years have passed since last update.

gitで今日の作業を振り返る

Posted at

Gitでその日にしたコミットのログを全て取得する方法。

--onelineオプションで各コミットを一行で表示します。
--branchesでブランチを指定するのですが*を渡せば全てになります。

git log --after="`date '+%Y-%m-%d'` 0:0" --oneline --branches *

作業報告しろとか面倒くさい指示をしてくる部長がいたらこうしましょう。

git log --after="`date '+%Y-%m-%d'` 0:0" --oneline --branches * | mail -s "本日の作業報告" butyo@example.com

複数のユーザがコミットしていて自分のコミットだけ抽出したい場合は--authorオプションを指定して以下のように。

git log --after="`date '+%Y-%m-%d'` 0:0" --oneline --author=name --branches *

午前0時を回るヘビープログラマの方はこちらのコマンドをおすすめします。
24時間以内のコミットが全て取得可能です。

git log --after='24 hour ago' --oneline

以上です!

54
50
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
54
50