We talk about what happens in a big team when lots of people are changing code using branching. And also we go into how to merge changes people make. Merging conflicts is discussed.
git checkout main
# Changes your local repository to point to the the main branch
git pull
# Updates your local main with the changes made to the remote main
git checkout ________
# Switches your local to point to the ________ feature branch
git merge main
# Updates the ________ feature branch with the new updates to main
Now we go into the file and decide which changes to keep.
current change is your own changes in your local repository
incoming change is the new change you got from the main branch
After that we delete all the ======== and other symbols.
To tell Git we have resolved the conflict:
git add **
# Add the files we fixed to the new commit
git commit -m "Merged changes from main"
# Make a commit message
git push or git push -u origin main
# Push the change on your local feature branch to the remote feature branch