3

How to log every branch last commit time?

Log the time relative today is excellent.

I know git branch -v show sha1 and commit subject line for each head.

I see the commit sha1, however, I don't remember each commit time.

jiexishede
  • 2,473
  • 6
  • 38
  • 54
  • http://stackoverflow.com/a/30076212/14955 – Thilo Apr 19 '17 at 11:31
  • 1
    Possible duplicate of [Listing each branch and its last revision's date in git](http://stackoverflow.com/questions/2514172/listing-each-branch-and-its-last-revisions-date-in-git) – Thilo Apr 19 '17 at 11:33

2 Answers2

0

Here is a sample how to it form one of my scripts.

git for-each-ref --sort=committerdate refs/heads/ --format='%(HEAD) %(color:yellow)%(refname:short)%(color:reset) - %(color:red)%(objectname:short)%(color:reset) - %(contents:subject) - %(authorname) (%(color:green)%(committerdate:relative)%(color:reset))'
CodeWizard
  • 128,036
  • 21
  • 144
  • 167
0
git log --branches --no-walk --date=relative

with any format options you like, maybe --format=%cd %d %s?

jthill
  • 55,082
  • 5
  • 77
  • 137