Search code examples
gitgithubgithub-pages

merge two github branches


So was starting with GitHub and created a repo with same name as the folder (i.e. resume) on my desktop. Now it created a default branch of name main.

Using a GitHub document (https://gist.github.com/mindplace/b4b094157d7a3be6afd2c96370d39fad), I pushed my code to the same repository in GitHub.

Now there are two branches in my GitHub repo (main and master).I tried to merge the two using Pull Request, but GitHub said that There is nothing to compare in the two branches.

I want to have master as my only branch. What can I do? Plz Help.

Here's the link to the repo https://github.com/Ankit29Git/resume.git


Solution

  • You can delete the main branch from the remote.

    git push origin --delete main
    

    for brief you can follow this https://www.freecodecamp.org/news/how-to-delete-a-git-branch-both-locally-and-remotely/