GIT merge custom branch back to main branch (using Tortoise GIT)

Scenario:

GIT merge custom branch back to main branch

Solution:

  1. Commit or stash any uncommitted changes.
  2. Right click -> Merge -> select main branch you want to merge in your custom branch -> OK.
  3. 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.
  4. Commit  (if not auto committed).
  5. Push changes.
  6. Right click -> Merge -> select next main branch you want to merge in your custom branch.
  7. Do #5.
  8. Switch checkout main branch, with checking below box:
    1. Override working tree changes
    2. Override branch if exists
  9. Merge custom branch to main branch with squash check box checked (to make all commits into one).
  10. If conflict go #3 else continue.
  11. Push changes.
  12. Show log (changes from parent 1 are main and parent 2 are custom branch)

No comments:

Post a Comment

Move Github Sub Repository back to main repo

 -- delete .gitmodules git rm --cached MyProject/Core git commit -m 'Remove myproject_core submodule' rm -rf MyProject/Core git remo...