Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

4
  • 1
    I like this idea, but as of git version 2.35.1 ... git switch --help | egrep -i EXPERIMENTAL said THIS COMMAND IS EXPERIMENTAL. THE BEHAVIOR MAY CHANGE.
    – MarkHu
    Commented Apr 28, 2022 at 18:18
  • The git switch command has been experimental from when it was introduced in version 2.23.0. See this from the Git Blog in August 2019 github.blog/2019-08-16-highlights-from-git-2-23
    – alondono
    Commented Apr 28, 2022 at 23:09
  • I'd say that it is normal for a new command to be introduced first as experimental. It simply means some of the options or flags might change, or others might be added or improved. The -c|-C flag behaviour discussed here has not changed since the command was introduced in August 2019.
    – alondono
    Commented Apr 28, 2022 at 23:21
  • 1
    Best answer for my specific usecase. Note that this checks the branch out after it reseted it to <start-point>. This is very useful for grapping another branch laying around somewhere, reset it to the current HEAD and start working on it. Commented Jul 4 at 8:24