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

Re: [git-users] Highlevel (but simple to implement) commands provided by default for git

From
Felipe Contreras <felipe.contreras@gmail.com>
Date
May 30, 2013, 03:04 UTC
Message-ID
<CAMP44s0YbQLAtmFxhgeY-18U63hF2n8L2LUOxaCnO8Mm7nsONQ@mail.gmail.com>
In-Reply-To
<CALkWK0mBOB1RM+MXH+Nvos29M5vqc2yAtC__zPyowf7imfnz9Q@mail.gmail.com>

On Wed, May 29, 2013 at 3:27 PM, Ramkumar Ramachandra <artagnon@gmail.com> wrote:

Show 16 quoted lines
> Felipe Contreras wrote:
>> We should probably also add typical shortucts:
>>
>> d = diff
>> l = log
>> f = fetch
>> p = push
>> r = reset
>> ci = commit
>> rb = rebase
>> co = checkout
>> st = status
>> pi = cherry-pick
>> mt = mergetool
>
> Terrible idea.
A "terrible idea" that somehow each and every other SCM tool in the planet does.

I don't see Mercurial users demanding that they take their useful shortcuts away, I see the opposite; they demand useful shortcuts for Git.

I say it's a terrible idea **not** to do that.
> We'll be eating up more subcommands that the user
> cannot override.

We won't. We can easily implement these as special aliases that the moment the user specifies something else.

But actually, we don't have to do anything because the current implementation already does that.

If the user has 'alias.ci=commit -v', and then we specify a default 'alias.ci=commit', the user's configuration takes precedence.

> I'm already unhappy with am not having been called
> apply-mailbox, because I want am to mean am -3 -c (too lazy to write
> those configuration variables).

cat > ~/bin/git-am <<EOF #!/bin/sh git am -3 -c "$@" EOF chmod +x ~/bin/git-am echo export GIT_EXEC_PATH=$HOME/bin:$(git --exec-path) >> ~/.profile

Done.

And I don't see what that has to do with default *aliases* the user can override. This is a red herring.

-- 
Felipe Contreras
Previous: Ramkumar RamachandraNext: Ramkumar Ramachandra
Message 16 of 24 in “Re: Highlevel (but simple to implement) commands provided by default for git”
  1. Bráulio BhavamitraMay 29, 2013
  2. Fwd: [git-users] Highlevel (but simple to implement) commands provided by default for gitBráulio Bhavamitra, May 29, 2013
  3. Ramkumar RamachandraMay 29, 2013
  4. Felipe ContrerasMay 29, 2013
  5. Ramkumar RamachandraMay 29, 2013
  6. Felipe ContrerasMay 30, 2013
  7. Junio C HamanoMay 29, 2013
  8. Ramkumar RamachandraMay 29, 2013
  9. Junio C HamanoMay 29, 2013
  10. Ramkumar RamachandraMay 29, 2013
  11. Junio C HamanoJun 2, 2013
  12. Duy NguyenJun 3, 2013
  13. Junio C HamanoMay 29, 2013
  14. Felipe ContrerasMay 29, 2013
  15. Ramkumar RamachandraMay 29, 2013
  16. Felipe ContrerasMay 30, 2013
  17. Ramkumar RamachandraMay 29, 2013
  18. Jonathan NiederMay 29, 2013
  19. Felipe ContrerasMay 30, 2013
  20. Jonathan NiederMay 30, 2013
  21. Felipe ContrerasMay 30, 2013
  22. Jonathan NiederMay 30, 2013
  23. Felipe ContrerasMay 30, 2013
  24. Ramkumar RamachandraMay 30, 2013

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.