Re: Usage of git whatchanged
On Sun, Sep 14, 2025, at 15:52, Bjoern Bastian wrote:
Show 10 quoted lines
> Hi Kristoffer,
>
> I simply followed the invitation printed upon `git whatchanged` to
> join in giving feedback from those who frequently use the command.
>
> I did not expect a thoughtful reply, so thank you very much for it!
>
>> `git log --raw --no-merged` is the closest equivalent.
>
> Thanks for pointing this out, true (actually `--no-merges`).
Show 8 quoted lines
>
>> What if you made a `wh` alias?
>>
>> wh = log --raw --no-merges
>
> Sure an alias will be the next obvious workaround. With bash I need to
> include `git ` though and just type `wh` on the command line which is
> okay. To get `git wh` I could maybe modify the bash completion.
You can also make a Git alias.
git config set --global alias.wh 'log --raw --no-merges'
> One can live without, but the statement "whatchanged is not even shorter
> to type than log --raw." on https://git-scm.com/docs/git-whatchanged is
> a weak one
I have a proposal to remove it.
> that misses obvious use cases of `whatchanged`.
The thing with git-whatchanged is that it uses the same underlying machinery as git-log. So there’s nothing that git-whatchanged can do that git-log cannot do.
... and I guess vice versa. But historically git-log ended up as the new-and-better replacement (according to the devs) with git-whatchanged being kept around for people who was used to typing it.
--
Kristoffer Haugsbakk