* should git command and git-command be equivalent?
@ 2007-10-16 3:22 franky
2007-10-16 7:48 ` Matthieu Moy
0 siblings, 1 reply; 6+ messages in thread
From: franky @ 2007-10-16 3:22 UTC (permalink / raw)
To: git
I use git-init frequently and it confuses me for a long time that I
can't init a bare repository.
I just found I can do that by "git -bare init". However, I get used
to "git-init" and I always tried "git-init -bare" (of course failed)
And I thought git-init and "git init" were always the same as most
newbies of git. So, should git init and git-init be equivalent? If not, I
think the document should be supplemented to clarify this.
franky
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: should git command and git-command be equivalent?
2007-10-16 3:22 should git command and git-command be equivalent? franky
@ 2007-10-16 7:48 ` Matthieu Moy
2007-10-16 8:47 ` franky
0 siblings, 1 reply; 6+ messages in thread
From: Matthieu Moy @ 2007-10-16 7:48 UTC (permalink / raw)
To: franky; +Cc: git
"franky" <yinping@kooxoo.com> writes:
> I use git-init frequently and it confuses me for a long time that I
> can't init a bare repository.
> I just found I can do that by "git -bare init". However, I get used
> to "git-init" and I always tried "git-init -bare" (of course failed)
> And I thought git-init and "git init" were always the same as most
> newbies of git.
AFAIK, git-init and "git init" are equivalent, but as you noticed
already, the advantage of "git init" is that you can pass options to
the git command, not only to the "init" subcommand.
Also, you can use aliases (for example, I type "git st" to do "git
status") with "git whatever", but not with "git-whatever" (unless you
define the alias in your shell).
The git-whatever syntax is more or less deprecated, although I guess
it will stay forever at least for compatibility.
--
Matthieu
^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: should git command and git-command be equivalent?
2007-10-16 7:48 ` Matthieu Moy
@ 2007-10-16 8:47 ` franky
2007-10-16 8:55 ` Matthieu Moy
0 siblings, 1 reply; 6+ messages in thread
From: franky @ 2007-10-16 8:47 UTC (permalink / raw)
To: 'Matthieu Moy'; +Cc: git
> Also, you can use aliases (for example, I type "git st" to do "git
> status") with "git whatever", but not with "git-whatever" (unless you
> define the alias in your shell).
I try "git st", but it complains "git: 'st' is not a git-command".
Instead, I use gt-beginning abbreviation for some command frequently used
such as gtci->git-commit, gtco-->git-checkout, gtst-->git-status,
gtdi->git-diff, gtinit->git-init
So it will be wonderful if I can use "gtinit --bare"
> --
> Matthieu
> -
> To unsubscribe from this list: send the line "unsubscribe git" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: should git command and git-command be equivalent?
2007-10-16 8:47 ` franky
@ 2007-10-16 8:55 ` Matthieu Moy
2007-10-16 12:28 ` David Symonds
0 siblings, 1 reply; 6+ messages in thread
From: Matthieu Moy @ 2007-10-16 8:55 UTC (permalink / raw)
To: franky; +Cc: git
"franky" <yinping@kooxoo.com> writes:
>> Also, you can use aliases (for example, I type "git st" to do "git
>> status") with "git whatever", but not with "git-whatever" (unless you
>> define the alias in your shell).
> I try "git st", but it complains "git: 'st' is not a git-command".
Sure, I'm talking about aliases, so what I meant is that I had
[alias]
st = status
in ~/.gitconfig.
> Instead, I use gt-beginning abbreviation for some command frequently used
> such as gtci->git-commit, gtco-->git-checkout, gtst-->git-status,
> gtdi->git-diff, gtinit->git-init
>
> So it will be wonderful if I can use "gtinit --bare"
You can't without defining gtinit as a simple-but-not-totally-trivial
wrapper script.
But you can define an alias to init, to enable you to type
$ git --bare i
(that said, it could be a good idea for "git init" to accept --bare as
an option too).
--
Matthieu
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: should git command and git-command be equivalent?
2007-10-16 8:55 ` Matthieu Moy
@ 2007-10-16 12:28 ` David Symonds
2007-10-16 14:46 ` Matthieu Moy
0 siblings, 1 reply; 6+ messages in thread
From: David Symonds @ 2007-10-16 12:28 UTC (permalink / raw)
To: Matthieu Moy; +Cc: franky, git
On 16/10/2007, Matthieu Moy <Matthieu.Moy@imag.fr> wrote:
> "franky" <yinping@kooxoo.com> writes:
>
> >> Also, you can use aliases (for example, I type "git st" to do "git
> >> status") with "git whatever", but not with "git-whatever" (unless you
> >> define the alias in your shell).
> > I try "git st", but it complains "git: 'st' is not a git-command".
>
> Sure, I'm talking about aliases, so what I meant is that I had
>
> [alias]
> st = status
>
> in ~/.gitconfig.
If you use the contrib/completion/git-completion.bash script, you can
type "git st<TAB>", and it'll complete it for you. Well, it did, until
git-stash came along and ruined it...
At any rate, the bash completion also completes things like branch
names, which can be immensely helpful.
Dave.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: should git command and git-command be equivalent?
2007-10-16 12:28 ` David Symonds
@ 2007-10-16 14:46 ` Matthieu Moy
0 siblings, 0 replies; 6+ messages in thread
From: Matthieu Moy @ 2007-10-16 14:46 UTC (permalink / raw)
To: David Symonds; +Cc: franky, git
"David Symonds" <dsymonds@gmail.com> writes:
> If you use the contrib/completion/git-completion.bash script, you can
> type "git st<TAB>", and it'll complete it for you. Well, it did, until
> git-stash came along and ruined it...
>
> At any rate, the bash completion also completes things like branch
> names, which can be immensely helpful.
I don't use bash, but the zsh completion for git is also excellent.
But "git st" is still one less key to type than "git st<tab>" ;-).
--
Matthieu
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2007-10-16 14:47 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-16 3:22 should git command and git-command be equivalent? franky
2007-10-16 7:48 ` Matthieu Moy
2007-10-16 8:47 ` franky
2007-10-16 8:55 ` Matthieu Moy
2007-10-16 12:28 ` David Symonds
2007-10-16 14:46 ` Matthieu Moy
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).