Intermediate Git
George Boorman
Curriculum Manager, DataCamp
Each branch should have a particular purpose
Once the task is complete, we incorporate the changes into production
main branch - "ground truth"When merging two branches:
source—the branch we want to merge fromdestination—the branch we want to merge intoWhen merging ai-assistant into main:
ai-assistant = sourcemain = destinationgit switch main
git merge source
From main, to merge ai-assistant into main:
git merge ai-assistant
git merge source destinationgit merge ai-assistant main



main to create ai-assistantmain to the last commit in the ai-assistant branch

Intermediate Git