I have created a new remote repo "infrastructure" on GitHub.
I have then created a local repo on my computer in the folder "infr" with
When I pushed my local repo with
git push -u origin master the new branch "master" was created.
I want to merge "master" branch into "main" branch now.
After trying to open a pull request git does not detect differences between them and does not let me do the merging, although checking each branch, you can see all files from my project in the master and nothing in the main.
I have tried renaming my "master" branch into "main" but I got an error : "Could not rename branch "master" at this time: New branch already exists".
So how do I merge master into main branch ?
I encountered same problem 4 days ago and what I have done is I opened my online repo in git site and went into repo settings and clicked on branches option. I changed the default branch from main to master and i later deleted the main branch as it was empty. tell me if this works for you.
Answered By – sravanTG