Git Switch Ast
git switch branch_name
git checkout branch_name
2 Programmers 1 Bug
git switch branch_name
git checkout branch_name
git switch branch_name_to_switch_to
#you will switch to that branch and changes between them will take effect
Note: changes if you switch to a branch will change back once you switch
back to the original branch/
git switch <branch_name> // switches to branch
git checkout <branch_name> // deletes file that were not pushed and just copies the branch to local repo
git checkout master
git branch {branch_name}
git checkout {branch_name}
git checkout -b mybranch
- git checkout branch_name --> goes to branch that already exists
- git checkout -b <branch_name> --> creates a new branch and switches to it.