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