Merging a second branch with the main branch #132189
Replies: 3 comments
-
|
E: strikeouts27: E: strikeouts27: that must be where the issue has started. E: Yeah that's a problem, you should remove git folders when you do that This is what I used for that scenario git push -u origin master --allow-unrelated-histories |
Beta Was this translation helpful? Give feedback.
-
|
Try using the browser, making a PR, and merging it there. |
Beta Was this translation helpful? Give feedback.
-
|
Remove: git branch -D main && git branch -m main && git push -f origin main |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Merge help needed, considering force push.
I am new to Github. I a recently made a branch and have done a ton of work on the second branch but it will not merge with my main branch. I get the error message, unable to merge unrelated histories in this repository. The thing is, i know for a fact that the branch, called second branch, came from main branch. They should have the same histories but Git is saying they do not.
Git Desktop gives me the option to force push the origin, which I percieve might be able to push all of my working code and everyone else can reset their own local branch to match the history of the remote. I was thinking we could all do a git pull first and be on the same page, and than i force push it.
Is there another way to do the merge? I will abstain from doing anything until I have some coaching.
Guidelines
Beta Was this translation helpful? Give feedback.
All reactions