Key Ideas
1What is a Branch?. A branch is a parallel timeline of your project. The default branch is called main (or master in older repos). When you create a new branch, you get an independent cop...
2Branch Commands. You only need a handful of commands to work with branches effectively. Here are all the essential ones:
3Merging Branches. When your feature is complete and tested, you merge it back into main. Git performs the merge automatically in most cases.
4Merge Conflicts: What They Are & How to Resolve Them. A merge conflict happens when both branches modified the same lines of the same file. Git can't decide which version to keep — it asks you to decide manually.
5git stash — Save Work in Progress. Sometimes you're in the middle of work but need to switch branches urgently (to fix a bug, help a colleague). git stash temporarily shelves your changes without commit...