How can I configure git log
to show commit date
instead of author date
?
相关问题
- Why does recursive submodule update from github fa
- Extended message for commit via Visual Studio Code
- Emacs shell: save commit message
- Can I organize Git submodules in a flat hierarchy?
- Upload file > 25 MB on Github
相关文章
- 请教Git如何克隆本地库?
- GitHub:Enterprise post-receive hook
- Git Clone Fails: Server Certificate Verification F
- SSIS solution on GIT?
- Is there a version control system abstraction for
- ssh: Could not resolve hostname git: Name or servi
- Cannot commit changes with gitextensions
- git: retry if http request failed
You can use
--pretty=format
and use%cr
for commit date relative.I have the following alias in my .gitconfig
Then simply run
git lol
and you'll see a nice color history with hash/date/author/comments.There are several options. Probably the easiest is to just use one of the pre-baked
--pretty
formats, likegit log --pretty=fuller
- this will show both dates. If you want to see only one date, but make it the commit date, you can usegit log --format=<some stuff>
. All the allowable codes for defining the format are documented ingit help log
. The commit date is one of%cd
,%cD
,%cr
,%ct
or%ci
, depending on what format you prefer it in.If it's something you want to do often, put it in an alias or write an auxiliary script to save on typing.