2

I have this setting in my .gitconfig:

[format]
    pretty = oneline

Which nicely formats my output of git-log. However it also changes the output of git-show (and git-status), which annoys me, because when I use git-show, I usually want to see more detailed output than when I'm using git-log.

Basically I want the default pretty setting of git-show to be different than the default pretty setting of git-log. Is this somehow possibly?

hgiesel
  • 5,430
  • 2
  • 29
  • 56

1 Answers1

2

You could create an alias for git log with the particular formatting you want.

git config --global alias.mylog 'log --pretty=oneline'

To use this alias just switch to the branch you want and type:

git mylog

You can remove the modification to your .gitconfig file and the default behavior will be there when you use git show.

Tim Biegeleisen
  • 502,043
  • 27
  • 286
  • 360