Scenario:
GIT merge custom branch back to main branch
Solution:
- Commit or stash any uncommitted changes.
- Right click -> Merge -> select main branch you want to merge in your custom branch -> OK.
- If no conflict jump to #4 else open the conflict files(s) and merge changes manually (- (orange) are the ones getting deleted, + added and = same) -> Save -> Mark as resolved -> Reload -> should be empty if no more conflicts.
- Commit (if not auto committed).
- Push changes.
- Right click -> Merge -> select next main branch you want to merge in your custom branch.
- Do #5.
- Switch checkout main branch, with checking below box:
- Override working tree changes
- Override branch if exists
- Merge custom branch to main branch with squash check box checked (to make all commits into one).
- If conflict go #3 else continue.
- Push changes.
- Show log (changes from parent 1 are main and parent 2 are custom branch)
No comments:
Post a Comment