Reputation: 2354
I have this alias git config --global alias.recent 'branch --sort=-committerdate --format="%(committerdate:relative)%09%(refname:short)"'
, it works fine: git recent
but I want to make this default behaviour when doing git branch
using a gitconfig file. I can't get the format
piece working:
[branch]
# this works
sort = -committerdate
# doesn't work:
format = \"%(committerdate:relative)%09%(refname:short)\"
# neither:
format = "%(committerdate:relative)%09%(refname:short)"
[alias]
# this is what git config command above adds:
recent = branch --sort=-committerdate --format=\"%(committerdate:relative)%09%(refname:short)\"
When I do git branch
just the sorting works. How can I get the format
working as well?
Upvotes: 0
Views: 115