git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Is it possible for git to remember the options preference for "git log"?

From
eric miao <eric.y.miao@gmail.com>
Date
Nov 12, 2007, 02:21 UTC
Message-ID
<f17812d70711111821v2e14cf6bsd65a192114872056@mail.gmail.com>
In-Reply-To
<Pine.LNX.4.64.0711111954520.29952@iabervon.org>
On Nov 12, 2007 9:02 AM, Daniel Barkalow <barkalow@iabervon.org> wrote:
Show 20 quoted lines
>
> On Mon, 12 Nov 2007, eric miao wrote:
>
> > All,
> >
> > Most of the time I'm using git-log for inspecting a brief history
> > and insert/remove/modify commits between, which I have to
> > type "git log --abbrev-commit --pretty=oneline" every time. Is
> > it possible for git to remember this command line options
> > preference?
> >
> > And no, I don't really want to use shell's alias or something
> > else, I was just used to type "git xxx" :-)
>
> Git has a built-in alias mechanism, which is probably what you want. If
> you put in your config file:
>
> [alias]
>         xxx = log --abbrev-commit --pretty=online
>
Thanks, this is exactly what I want.
Show 5 quoted lines
> then you can type "git xxx" and it'll do what you want. Changing the
> default behavior of the basic commands is looked down on because there are
> scripts that use them to get their input, and those scripts have
> particular formats they expect.
>
Ye, agree, I don't think that's a good idea either.
>         -Daniel
> *This .sig left intentionally blank*
>
-- 
Cheers
- eric
Previous: Daniel Barkalow
Message 4 of 4 in “Is it possible for git to remember the options preference for "git log"?”
  1. eric miaoNov 12, 2007
  2. Jakub NarebskiNov 12, 2007
  3. Daniel BarkalowNov 12, 2007
  4. eric miaoNov 12, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.