I'd like to set up a git alias which, upon git log
would run
git log --pretty=format:"%C(yellow)%h %C(red)%an, %C(green)%ar %""s"
--since=2.weeks –n20
I tried running
git config --global alias.log 'log --pretty=format:"%C(yellow)%h
%C(red)%an, %C(green)%ar %""s" --since=2.weeks –n20'
And confirmed that it is recorded in .gitconfig as
28 [alias]
…
34 log = log --pretty=format:\"%C(yellow)%h %C(red)%an,
%C(green)%ar %\"\"s\" --since=2.weeks –n20
This however does not format git output as expected.
What am I missing please?
From git documentation:
To avoid confusion and troubles with script usage, aliases that hide existing git commands are ignored.
You'll have to rename your alias.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With