How do I get last commit date from git repository?

前端 未结 3 1143
甜味超标
甜味超标 2020-12-13 17:19

I need the last commit date in git. This means the latest update date in my program.

I used the command : $ git log -1 but this command will give me the

3条回答
  •  清歌不尽
    2020-12-13 17:47

    The following command will be helpful:

    git log -1 --format=%cd 
    

    This will print the latest change date for one file. The -1 shows one log entry (the most recent), and --format=%cd shows the commit date. See the documentation for git-log for a full description of the options.

提交回复
热议问题