There isn't anything to compare. Nothing to compare, branches are entirely different commit histories

后端 未结 18 908
北恋
北恋 2020-12-12 22:54

I have a CMS theme installed on my machine. I\'m tracking changes to it via git and decided to back it up on GitHub so I could share those changes.

The theme as prov

18条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-12 23:13

    I wanted to copy commit history of "master" branch & overwrite the commit history of "main" branch .
    The steps are:-

    1. git checkout master
    2. git branch main master -f
    3. git checkout main
    4. git push

    To delete master branch:-

    a. Locally:-

    1. git checkout main
    2. git branch -d master

    b. Globally:-

    1. git push origin --delete master

    Do Upvote it!

提交回复
热议问题