This section is dedicated to testing how to resolve conflicts in Git. Conflicts occur when changes from different branches or commits overlap. (change here from upstream) To resolve a new conflict, you need to manually edit the conflicting files to reconcile the differences, then stage and commit the resolved changes.
- Create a conflict by modifying the same line in a file on two different branches.
- Edit the file to resolve the conflict.
- Attempt to merge the branches to trigger a conflict.
- Stage and commit the resolved file.
- Add changes from upstream
- Add more changes from upstream
- Add main branch changes
By practicing conflict resolution, you can ensure smooth collaboration in your projects.