Merge project from other branch git

93 views Asked by At

We are working on two (maven) projects, project-a and project-b on a git repository.

I have created a branch branch-a on which I have been working on project-a and now I want to align the code of project-b, from the branch main, basically overwriting any modification that I might have inadvertently made on it, but keeping my version of project-a.

Here is a visual explanation:

Current situation                What I want

main                             main                        (untoched)
  |___project-a-v1.0               |___project-a-v1.0
  |___project-b-v5.0               |___project-b-v5.0

branch-a                         branch-a                    (project-b is aligned 
  |___project-a-v2.0               |___project-a-v2.0        with main)
  |___project-b-v2.0               |___project-b-v5.0

What is the correct procedure on Git (or EGit) to achieve this?

Thank you.

0

There are 0 answers