This content originally appeared on DEV Community and was authored by Kumar Nitesh
Another unknown command, but with a disclaimer
THIS COMMAND IS EXPERIMENTAL. THE BEHAVIOR MAY CHANGE.
How do I used to switch branch
// switch to existing branch
$ git checkout <existing_branch>
// create and switch to new branch
$ git checkout -b <new_branch>
How I have started switching branch now
// switch to existing branch
$ git switch <existing_branch>
// create and switch to new branch
$ git switch -c <new_branch>
All git switch
options
git switch [<options>] [--no-guess] <branch>
git switch [<options>] --detach [<start-point>]
git switch [<options>] (-c|-C) <new-branch> [<start-point>]
git switch [<options>] --orphan <new-branch>
Kumar Nitesh
This content originally appeared on DEV Community and was authored by Kumar Nitesh
Kumar Nitesh | Sciencx (2022-04-09T15:47:46+00:00) Git Switch. Retrieved from https://www.scien.cx/2022/04/09/git-switch/
Please log in to upload a file.
There are no updates yet.
Click the Upload button above to add an update.