About Lesson
- Usage: git checkout[branch name]
- This command is used to switch from one branch to another
- [vagrant@master-]$ git checkout branch1
- M file1.txt
- M file2.txt
- Switched to branch ‘branch1’
Usage:git checkout -b[branch name]
- This command creates a new branch and also switches toit.
- [vagrant@master-}$ git checkout-b branch1
- M file1.txt
- M file2.txt
- Switched to a new branch ‘branch1’
Join the conversation