{"thread":{"id":"57090","subject":"Adding new/create & del/delete aliases into git","startedAt":"2021-12-16T13:29:28Z","lastAt":"2021-12-17T00:58:02Z","messageCount":3,"participants":["Jasdeep Khalsa","Ævar Arnfjörð Bjarmason","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"444208","messageId":"CALtRjJ3bu1ub=407kt-aemfV6BU8CfPZJxLRG5WgTZBYWbaXCQ@mail.gmail.com","threadId":"57090","inReplyTo":null,"subject":"Adding new/create & del/delete aliases into git","fromName":"Jasdeep Khalsa","fromEmail":"jasdeepkhalsa1@gmail.com","sentAt":"2021-12-16T13:29:15Z","receivedAt":"2021-12-16T13:29:28Z","isPatch":false,"sender":{"key":"jasdeepkhalsa1@gmail.com","avatar":null},"body":"Hi there Git Community!\n\nI've been using the following aliases for a long time:\n\ndel or delete = branch -D\nnew or create = checkout -b\n\nAnd I feel these are good candidates as an addition into the core git\nAPI as they provide an easy way for new starters to understand the\ncreating and deleting of branches - which is arguably one of the most\ncommon git operations.\n\nIn comparison, passing in flags for this purpose for new starters to\ngit, is both hard to remember and not easy or obvious to understand\nwhat is going on.\n\nFrom my understanding, these flags were also meant as a shortcut to do\na git branch && git checkout in one operation - effectively being\nalias flags anyway.\n\nSo I wanted to reach out to find out what appetite there may be out\nthere to add/change these to be simpler for new starters to git :)\n\nThanks for considering my proposal and happy to discuss any thoughts!\n\nJasdeep\n\nhttps://github.com/jasdeepkhalsa\n"},{"id":"444284","messageId":"211217.86ee6c9kqv.gmgdl@evledraar.gmail.com","threadId":"57090","inReplyTo":"CALtRjJ3bu1ub=407kt-aemfV6BU8CfPZJxLRG5WgTZBYWbaXCQ@mail.gmail.com","subject":"Re: Adding new/create & del/delete aliases into git","fromName":"Ævar Arnfjörð Bjarmason","fromEmail":"avarab@gmail.com","sentAt":"2021-12-16T23:43:48Z","receivedAt":"2021-12-16T23:46:06Z","isPatch":false,"sender":{"key":"avarab@gmail.com","avatar":"https://avatars.githubusercontent.com/u/45301?v=4"},"body":"\nOn Thu, Dec 16 2021, Jasdeep Khalsa wrote:\n\n> Hi there Git Community!\n>\n> I've been using the following aliases for a long time:\n>\n> del or delete = branch -D\n> new or create = checkout -b\n>\n> And I feel these are good candidates as an addition into the core git\n> API as they provide an easy way for new starters to understand the\n> creating and deleting of branches - which is arguably one of the most\n> common git operations.\n\nAs a general advice if we're providing any sort of sugar / default flags\neither as a guide or as aliases for newcomers it's probably good to not\ndo so with --force, i.e. your -D will shred data users might still want,\nbetter to make it a -d. You can always add -D when needed.\n\n> In comparison, passing in flags for this purpose for new starters to\n> git, is both hard to remember and not easy or obvious to understand\n> what is going on.\n>\n> From my understanding, these flags were also meant as a shortcut to do\n> a git branch && git checkout in one operation - effectively being\n> alias flags anyway.\n>\n> So I wanted to reach out to find out what appetite there may be out\n> there to add/change these to be simpler for new starters to git :)\n>\n> Thanks for considering my proposal and happy to discuss any thoughts!\n>\n> Jasdeep\n>\n> https://github.com/jasdeepkhalsa\n\nThere was a more extensive proposal discussed on-list recently here:\nhttps://lore.kernel.org/git/20210702100506.1422429-6-felipe.contreras@gmail.com/\n\nI think if you're interested reading that & using some of the things\nthat came up there as a jumping-off point would be a good place to\nstart.\n\n"},{"id":"444306","messageId":"xmqqmtl059pl.fsf@gitster.g","threadId":"57090","inReplyTo":"CALtRjJ3bu1ub=407kt-aemfV6BU8CfPZJxLRG5WgTZBYWbaXCQ@mail.gmail.com","subject":"Re: Adding new/create & del/delete aliases into git","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2021-12-17T00:57:58Z","receivedAt":"2021-12-17T00:58:02Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Jasdeep Khalsa <jasdeepkhalsa1@gmail.com> writes:\n\n> I've been using the following aliases for a long time:\n>\n> del or delete = branch -D\n> new or create = checkout -b\n>\n> And I feel these are good candidates as an addition into the core git\n> API as they provide an easy way for new starters to understand the\n> creating and deleting of branches - which is arguably one of the most\n> common git operations.\n\nHe wants to see his \"create\" to create and \"delete\" to delete a\nworktree, not a branch.  And she wants to see her \"create\" to create\nand \"delete\" to delete a repository, not a branch.\n\nNot everybody shares your \"feel that these are common\".\n\nAliases and synonyms are so personal and it is better to make sure\nthat we do not define more than necessary at the public level.\nOtherwise we will end up squatting on more good names that people\nmay want to use for their own aliases.\n\n"}]}