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,343
  • 6
  • 34
  • 53
  • 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
  • 110,388
  • 20
  • 126
  • 153
0
git log --branches --no-walk --date=relative

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

jthill
  • 48,781
  • 4
  • 72
  • 120