Rebasing a git history with empty commit messages

前端 未结 6 1888
谎友^
谎友^ 2020-12-14 20:20

I recently converted an svn repository with git svn. Unfortunately the svn history has a number of empty commit messages. This is a problem when I rebase and

6条回答
  •  一整个雨季
    2020-12-14 20:32

    You can use cherry pick:

    git checkout -b temp_branch master
    git checkout
    git cherry-pick --allow-empty-message first_commit_to_include^..my_branch
    # delete old my_branch and rename temp_branch to my_branch
    git branch -D my_branch
    git branch -m my_branch
    

提交回复
热议问题