简体   繁体   English

合并两个 github 分支

[英]merge two github branches

So was starting with GitHub and created a repo with same name as the folder (ie resume) on my desktop.所以从 GitHub 开始,并在我的桌面上创建了一个与文件夹(即简历)同名的存储库。 Now it created a default branch of name main .现在它创建了一个名为main的默认分支。

Using a GitHub document ( https://gist.github.com/mindplace/b4b094157d7a3be6afd2c96370d39fad ), I pushed my code to the same repository in GitHub. 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 .现在我的 GitHub 存储库中有两个分支(主和)。我尝试使用 Pull Request 合并这两个分支,但 GitHub 说这两个分支中没有什么可比较的

I want to have master as my only branch.我想让master作为我唯一的分支。 What can I do?我能做些什么? Plz Help.请帮助。

Here's the link to the repo https://github.com/Ankit29Git/resume.git这是回购https://github.com/Ankit29Git/resume.git的链接

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/简而言之,您可以关注此https://www.freecodecamp.org/news/how-to-delete-a-git-branch-both-locally-and-remotely/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM