GitHub Branches
Welcome back to Bite-Sized! In this episode, Timnah and Fabian introduce you to GitHub Branches — a powerful way to work on new ideas without affecting your main project.
Why Branches?
Branches let you experiment safely.
Try new features or fixes without changing the main code until you’re ready.
Branch Management
Don’t leave stale branches lying around — delete them once you’re done to keep your repo clean!
GitHub Branches – Key Takeaways
-
What is a Branch?
A branch is a parallel version of your project where you can work independently from the main branch. -
Branch Usage:
- Start a branch to add features, fix bugs, or test changes.
- Changes on one branch don’t affect others until merged.
-
Creating and Switching Branches:
- Open the branches menu on GitHub and click “New branch”.
- Name your branch and switch to it.
- Switch back anytime via the same menu.
-
Deleting Branches:
- Open the branches menu and click the trash bin icon next to the branch you want to remove.
Next Steps: Once comfortable with branches, learn how to merge changes back into your main branch using pull requests in our next video!