Search code examples
visual-studio-codegitlens

How to display author + date in specific format?


I want to see in each line which person write it, and the date. I downloaded the gitlens extension.

I just want you, 24-03-2025 format. This is what I tried and no luck:

  • ${author} ${date}
  • ${author} • ${date|'DD-MM-YYYY'}
  • ${author}, ${date|'DD-MM-YYYY'}
  • ${author}, ${date|'DD-MM-YYYY'}

Can someone solve this mystery? I do not want hours, just the data and the author.


Solution

  • You have to use update two GitLens settings:

    {
        "gitlens.currentLine.format": "${author, } ${date}",
        "gitlens.currentLine.dateFormat": "DD-MM-YYYY"
    }
    

    Doing so, the Line Blame will be displayed as you expect:

    Screenshot of the Git Line Blame working as expected