2

My ~/.gitconfig contains

[branch]
    sort = -committerdate

yet this has no effect as I easily see when comparing to the output of

git branch --sort=-committerdate

Yet my question is not how to fix this. Rather I wonder if there is a way to debug this by showing the effective options of a git command including anything injected from configurations. Is there such a thing (a bit like set -x in bash)?

Harald
  • 4,575
  • 5
  • 33
  • 72
  • Does this answer your question? [How can I debug git/git-shell related problems?](/q/6178401/4518341) I don't have any experience with this myself, but I found that by googling `debug git` and it looks promising. The top answer is pretty succinct but the next one goes into more detail. – wjandrea Jan 05 '22 at 19:11
  • Uff, nice find. I was too focused with my searches it seems. Leads to https://git-scm.com/book/en/v2/Git-Internals-Environment-Variables for more about TRACE environment variables. Leaving the comment as a thanks to @wjandrea, but will delete this question sometime soon as it is a duplicate. – Harald Jan 05 '22 at 19:21
  • No need to delete it! This question [could be useful as a signpost](https://meta.stackexchange.com/q/230/343832) in case anyone has the same problem in the future, including yourself :) I'll vote to close as duplicate and you can just approve it. – wjandrea Jan 05 '22 at 19:25

0 Answers0