Git: Create and switch branches
A short, tested Git example for create and switch branches. Copy it and adjust the names and paths for your project.
Git
git switch -c feature/login # create and switch
git switch main # switch back
git branch # list
git branch -d feature/login # delete (merged)
git branch -D feature/login # delete (force)Find it in Zest
Search for “git create and switch branches” in Zest and this example appears above the results, with other matches to choose from. Searches stay private.