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 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 checkout xyz =
checks out the branch, switches to the branch.
- git checkout -b <branch_name> =
creates a new branch and switches to it.
- git merge <branch_name> =
this command takes changes from the given branch,
and merges with the current branches we are on.