{"thread":{"id":"10298","subject":"should git command and git-command be equivalent?","startedAt":"2007-10-16T03:22:39Z","lastAt":"2007-10-16T14:46:10Z","messageCount":6,"participants":["franky","Matthieu Moy","David Symonds"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"55936","messageId":"20071016032240.AD2FD7E80@mail.kooxoo.com","threadId":"10298","inReplyTo":null,"subject":"should git command and git-command be equivalent?","fromName":"franky","fromEmail":"yinping@kooxoo.com","sentAt":"2007-10-16T03:22:39Z","receivedAt":"2007-10-16T03:22:39Z","isPatch":false,"sender":{"key":"yinping@kooxoo.com","avatar":null},"body":"\tI use git-init frequently and it confuses me for a long time that I\ncan't init a bare repository. \n\tI just found I can do that by \"git -bare init\". However, I get used\nto \"git-init\" and I always tried \"git-init -bare\" (of course failed)\n\tAnd I thought git-init and \"git init\" were always the same as most\nnewbies of git. So, should git init and git-init be equivalent? If not, I\nthink the document should be supplemented to clarify this.\n\n franky\n"},{"id":"55976","messageId":"vpqprzfsdo3.fsf@bauges.imag.fr","threadId":"10298","inReplyTo":"20071016032240.AD2FD7E80@mail.kooxoo.com","subject":"Re: should git command and git-command be equivalent?","fromName":"Matthieu Moy","fromEmail":"matthieu.moy@imag.fr","sentAt":"2007-10-16T07:48:28Z","receivedAt":"2007-10-16T07:48:28Z","isPatch":false,"sender":{"key":"git@matthieu-moy.fr","avatar":"https://avatars.githubusercontent.com/u/14709?v=4"},"body":"\"franky\" <yinping@kooxoo.com> writes:\n\n> \tI use git-init frequently and it confuses me for a long time that I\n> can't init a bare repository. \n> \tI just found I can do that by \"git -bare init\". However, I get used\n> to \"git-init\" and I always tried \"git-init -bare\" (of course failed)\n> \tAnd I thought git-init and \"git init\" were always the same as most\n> newbies of git.\n\nAFAIK, git-init and \"git init\" are equivalent, but as you noticed\nalready, the advantage of \"git init\" is that you can pass options to\nthe git command, not only to the \"init\" subcommand.\n\nAlso, you can use aliases (for example, I type \"git st\" to do \"git\nstatus\") with \"git whatever\", but not with \"git-whatever\" (unless you\ndefine the alias in your shell).\n\nThe git-whatever syntax is more or less deprecated, although I guess\nit will stay forever at least for compatibility.\n\n-- \nMatthieu\n"},{"id":"55990","messageId":"20071016084800.270917E6F@mail.kooxoo.com","threadId":"10298","inReplyTo":"vpqprzfsdo3.fsf@bauges.imag.fr","subject":"RE: should git command and git-command be equivalent?","fromName":"franky","fromEmail":"yinping@kooxoo.com","sentAt":"2007-10-16T08:47:58Z","receivedAt":"2007-10-16T08:47:58Z","isPatch":false,"sender":{"key":"yinping@kooxoo.com","avatar":null},"body":"> Also, you can use aliases (for example, I type \"git st\" to do \"git\n> status\") with \"git whatever\", but not with \"git-whatever\" (unless you\n> define the alias in your shell).\nI try \"git st\", but it complains \"git: 'st' is not a git-command\".\nInstead, I use gt-beginning abbreviation for some command frequently used\nsuch as gtci->git-commit, gtco-->git-checkout, gtst-->git-status,\ngtdi->git-diff, gtinit->git-init\n\nSo it will be wonderful if I can use \"gtinit --bare\"\n\n> --\n> Matthieu\n> -\n> To unsubscribe from this list: send the line \"unsubscribe git\" in\n> the body of a message to majordomo@vger.kernel.org\n> More majordomo info at  http://vger.kernel.org/majordomo-info.html\n"},{"id":"55991","messageId":"vpqk5pnmoah.fsf@bauges.imag.fr","threadId":"10298","inReplyTo":"20071016084800.270917E6F@mail.kooxoo.com","subject":"Re: should git command and git-command be equivalent?","fromName":"Matthieu Moy","fromEmail":"matthieu.moy@imag.fr","sentAt":"2007-10-16T08:55:34Z","receivedAt":"2007-10-16T08:55:34Z","isPatch":false,"sender":{"key":"git@matthieu-moy.fr","avatar":"https://avatars.githubusercontent.com/u/14709?v=4"},"body":"\"franky\" <yinping@kooxoo.com> writes:\n\n>> Also, you can use aliases (for example, I type \"git st\" to do \"git\n>> status\") with \"git whatever\", but not with \"git-whatever\" (unless you\n>> define the alias in your shell).\n> I try \"git st\", but it complains \"git: 'st' is not a git-command\".\n\nSure, I'm talking about aliases, so what I meant is that I had\n\n[alias]\n\tst = status\n\nin ~/.gitconfig.\n\n> Instead, I use gt-beginning abbreviation for some command frequently used\n> such as gtci->git-commit, gtco-->git-checkout, gtst-->git-status,\n> gtdi->git-diff, gtinit->git-init\n>\n> So it will be wonderful if I can use \"gtinit --bare\"\n\nYou can't without defining gtinit as a simple-but-not-totally-trivial\nwrapper script.\n\nBut you can define an alias to init, to enable you to type\n\n$ git --bare i\n\n(that said, it could be a good idea for \"git init\" to accept --bare as\nan option too).\n\n-- \nMatthieu\n"},{"id":"56021","messageId":"ee77f5c20710160528k520704d7pd3cf99dea1f83a77@mail.gmail.com","threadId":"10298","inReplyTo":"vpqk5pnmoah.fsf@bauges.imag.fr","subject":"Re: should git command and git-command be equivalent?","fromName":"David Symonds","fromEmail":"dsymonds@gmail.com","sentAt":"2007-10-16T12:28:28Z","receivedAt":"2007-10-16T12:28:28Z","isPatch":false,"sender":{"key":"dsymonds@gmail.com","avatar":"https://gravatar.com/avatar/b22f5051cbfc11836e36cf7a690e6cde4e225d835e13295ff98d15c7a9ee3c0f?d=mp&s=160"},"body":"On 16/10/2007, Matthieu Moy <Matthieu.Moy@imag.fr> wrote:\n> \"franky\" <yinping@kooxoo.com> writes:\n>\n> >> Also, you can use aliases (for example, I type \"git st\" to do \"git\n> >> status\") with \"git whatever\", but not with \"git-whatever\" (unless you\n> >> define the alias in your shell).\n> > I try \"git st\", but it complains \"git: 'st' is not a git-command\".\n>\n> Sure, I'm talking about aliases, so what I meant is that I had\n>\n> [alias]\n>         st = status\n>\n> in ~/.gitconfig.\n\nIf you use the contrib/completion/git-completion.bash script, you can\ntype \"git st<TAB>\", and it'll complete it for you. Well, it did, until\ngit-stash came along and ruined it...\n\nAt any rate, the bash completion also completes things like branch\nnames, which can be immensely helpful.\n\n\nDave.\n"},{"id":"56055","messageId":"vpqhckri0ct.fsf@bauges.imag.fr","threadId":"10298","inReplyTo":"ee77f5c20710160528k520704d7pd3cf99dea1f83a77@mail.gmail.com","subject":"Re: should git command and git-command be equivalent?","fromName":"Matthieu Moy","fromEmail":"matthieu.moy@imag.fr","sentAt":"2007-10-16T14:46:10Z","receivedAt":"2007-10-16T14:46:10Z","isPatch":false,"sender":{"key":"git@matthieu-moy.fr","avatar":"https://avatars.githubusercontent.com/u/14709?v=4"},"body":"\"David Symonds\" <dsymonds@gmail.com> writes:\n\n> If you use the contrib/completion/git-completion.bash script, you can\n> type \"git st<TAB>\", and it'll complete it for you. Well, it did, until\n> git-stash came along and ruined it...\n>\n> At any rate, the bash completion also completes things like branch\n> names, which can be immensely helpful.\n\nI don't use bash, but the zsh completion for git is also excellent.\n\nBut \"git st\" is still one less key to type than \"git st<tab>\" ;-).\n\n-- \nMatthieu\n"}]}