{"thread":{"id":"53371","subject":"Why are experimental commands git restore and git switch suggested in CLI output?","startedAt":"2020-05-02T07:18:39Z","lastAt":"2020-05-02T16:45:00Z","messageCount":2,"participants":["Erik Huizinga","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"396815","messageId":"CADA507xceVtpNkK5hyUrnXM0rPBj=sgpR0eM7b+yybiWT6Cg3w@mail.gmail.com","threadId":"53371","inReplyTo":null,"subject":"Why are experimental commands git restore and git switch suggested in CLI output?","fromName":"Erik Huizinga","fromEmail":"huizinga.erik@gmail.com","sentAt":"2020-05-02T07:18:26Z","receivedAt":"2020-05-02T07:18:39Z","isPatch":false,"sender":{"key":"huizinga.erik@gmail.com","avatar":null},"body":"Hello!\n\nLately I've noticed that when I checkout a branch or show the working\ntree status, then the CLI output suggests that I can perform certain\nactions with new commands (since v2.23 if I'm not mistaken) restore\nand switch. This is very nice, because I like to see these UI\nenhancements. However, reading the help pages for these commands shows\n'THIS COMMAND IS EXPERIMENTAL. THE BEHAVIOR MAY CHANGE.' This is\nsomewhat discouraging use, because I don't want to learn to use these\ncommands if their behavior may change. This could mean that what I\nlearn about these command may not be usable on future git versions.\n\nMy questions about this are:\n\n1. What is the git maintainers' policy regarding experimental features\nlike restore and switch? Apparently, they are there to be discovered\nin plain sight, while experimental. Using experimental features may\nnot be what the user wants.\n2. What exactly may change about these commands' behavior? Are the\nsuperficially suggested actions stable? Are they stable within a patch\nor minor git version only? Are existing use cases stable, or can they\nbe removed or incompatibly change under this experimental policy?\n\nIn other words: how can I, an individual end user, know what I can\nsafely learn about these commands, and what can not?\n\nThank you in advance for your time and answers. :)\nErik Huizinga\n"},{"id":"396835","messageId":"xmqqtv0yjngb.fsf@gitster.c.googlers.com","threadId":"53371","inReplyTo":"CADA507xceVtpNkK5hyUrnXM0rPBj=sgpR0eM7b+yybiWT6Cg3w@mail.gmail.com","subject":"Re: Why are experimental commands git restore and git switch suggested in CLI output?","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2020-05-02T16:44:52Z","receivedAt":"2020-05-02T16:45:00Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Erik Huizinga <huizinga.erik@gmail.com> writes:\n\n> In other words: how can I, an individual end user, know what I can\n> safely learn about these commands, and what can not?\n\nThe restore/switch commands are thought to be the future, and for a\nbetter future, we still want to polish them further, which means\nthey may gain new features, their existing behaviour may change, or\nsome features that are found to be bad for users may be dropped.\n\nAnd we will know what new features are desirable, which parts of\ntheir existing behaviour should be improved in what way, and which\nparts of their existing features cause confusion to users and need\nto be dropped, only by listening to those who actually use them in\ntheir daily life.  That is what an experiment is.  By definition,\nwe won't know what will going to change.\n\nUsers who want to help improve future Git are encouraged to use\nthese experimental commands and complain (especially when they find\nthat these commands do not work for them in their workflow better\nthan \"git checkout\", which these commands are meant to replace).\nTheir voices will be heard and the commands may gain what they want\nand lose what they do not want.\n\nUsers who do not care about participating in polishing these two\ncommands for a better Git in the future can stick to what they\nalready know, \"git checkout\".  But eventually these users would have\nto learn \"switch/restore\" and their then-current set of features, as\n(hopefully) they would be much better than \"git checkout\" by then.\n\nThanks.\n"}]}