I want to know if there is a way to set a flag by default for git command. Specifically, I want to set the --abbrev-commit flag so that when executing git log, I want to execute git log --abbrev-commit.
Unlike the question "is there any way to set a flag by default for a git command?", there is apparently not a configuration flag for adding --abbrev-commit to git log. Furthermore, the git manual states that I cannot create an alias: "To avoid confusion and troubles with script usage, aliases that hide existing git commands are ignored"
My third option is to invent a new alias like glog=log --abbrev-commit in my .gitconfig file. But I'd rather not invent my own DSL with new commands.
Is there another way to achieve it so that the abbrev-commit flag is set by default??
git[1] [2]). I would like to see Git offer an option within .gitconfig to point commands to aliases. Alternatively, a new config category/group "prepend", where could define something likeprepend.log = "--stat --find-renames --stat-count=5"; prepend.diff = "blahblahblah".