{"thread":{"id":"48201","subject":"git log --oneline cannot display dates","startedAt":"2018-04-02T12:05:46Z","lastAt":"2018-04-02T12:41:06Z","messageCount":2,"participants":["David Hoyle","Jeff King"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"343576","messageId":"CAFGVh0zWuqa5HswE7JAx3-bOSGGaRAgLa6ULy--+yn_iD5eJRQ@mail.gmail.com","threadId":"48201","inReplyTo":null,"subject":"git log --oneline cannot display dates","fromName":"David Hoyle","fromEmail":"davidghoyle@gmail.com","sentAt":"2018-04-02T12:05:01Z","receivedAt":"2018-04-02T12:05:46Z","isPatch":false,"sender":{"key":"davidghoyle@gmail.com","avatar":null},"body":"When using the git log command with the --oneline switch, you cannot\nadd the --date=<date> switch to see the dates. The only workaround is\nto create an alias and use the --pretty-format which doesn't provide\nthe ability to colour the branch and tag information (as far as i can\ntell).\n\nregards\nDavid Hoyle.\n"},{"id":"343578","messageId":"20180402124059.GA396@sigill.intra.peff.net","threadId":"48201","inReplyTo":"CAFGVh0zWuqa5HswE7JAx3-bOSGGaRAgLa6ULy--+yn_iD5eJRQ@mail.gmail.com","subject":"Re: git log --oneline cannot display dates","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2018-04-02T12:40:59Z","receivedAt":"2018-04-02T12:41:06Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Mon, Apr 02, 2018 at 01:05:01PM +0100, David Hoyle wrote:\n\n> When using the git log command with the --oneline switch, you cannot\n> add the --date=<date> switch to see the dates.\n\nRight. --date is just about selecting which date format to show, not\nwhether to show one. The decision of what to show is up to the format,\nand --oneline does not include a date.\n\n> The only workaround is\n> to create an alias and use the --pretty-format which doesn't provide\n> the ability to colour the branch and tag information (as far as i can\n> tell).\n\nYou can use \"%C(auto)\" to turn on auto-coloring for various components:\n\n  git log --format='%C(auto)%h%d %s'\n\nwhich reproduces the usual coloring and format of --oneline. Then you\nshould be able to add in your own date, colored as you wish. E.g.:\n\n  git log --format='%C(auto)%h%d %C(blue)%ad%C(reset) %s'\n\nIf you want to use this a lot, you may want to look into the \"pretty.*\"\nconfig so you can trigger it with a short name.\n\n-Peff\n"}]}