How To Merge Master And Main Branch In Github With Eclipse
Hello,
here I describe how I merged two new and different branches in my github repository "Hamurabi".
The Problem
I have created a main branch by default.
But my code was uploaded into the "Master" branch.
Now I want to merge both, but I get a error message on github, when I try a merge request:
"main and master are entirely different commit histories."
This is what worked out:
In Eclipse, do your changes in the branch that you want to keep, commit them and then click on "push HEAD".
In the following dialog choose a different branch. Check "Force overwrite branch in remote if it exists and has diverged". Be aware that it deletes all files in the target branch. (Maybe you copy some needed files from target to source branch before):
I repeated this for the branch "Develop".
After that I was able to merge both (master and Develop) branches:
Regards, Achim
Leave How To Merge Master And Main Branch In Github With Eclipse to:
Read more #programming posts
Best Posts From Achim Mertens
We have not curated any of achimmertens's posts yet. But you can encourage our curation team to review posts by visiting them regularly and by referring other readers. Because we give priority to frequently read content.
More Posts From Achim Mertens
- My Diary For Week 29
- My Diary For Week 28
- My Diary For Week 27
- My Diary For Week 26
- Mein IAM+PAM System auf dem Raspberry Pi
- My Diary For Week 25
- Wanderung zum Rothen Kreuz in der Eifel - Hiking in the Eifel (Germany)
- My Diary For Week 24
- My Diary For Week 24
- Backup und Restore meines Raspberry Pi mit Openclaw