Chapter 5. Work With Branches
When you add some features while continuing to work on the main code development, you may want to manage several versions of the code. The branch functionality allows you or your team members to work on different versions of code simultaneously. In this chapter, we’ll explain branches and related key Git commands. Topics covered in this chapter are the following.
Lessons in this chapter
- Git Regular Workflow – Work With Branches
- What Is Branch?
- Branch Operation Basic Life Cycle
- Create Branch and Check Branch Status – Git Branch
- Switch Current Branch (1) – Git Checkout
- Switch Current Branch (2) – Git Switch
- Merge Branches – Git Merge
- Fast-Forward Merge
- Non-Fast-Forward Merge (No Option)
- Non-Fast-Forward Merge (--no-ff Option)
- Squash Merge
- Rebase Branch – Git Rebase
- Managing Conflict
- Stash Changes – Git Stash