Can tags be automatically moved after a git filter-branch and rebase?

前端 未结 5 635
别那么骄傲
别那么骄傲 2020-11-30 10:18

edit The question boils down to \"Can git rebase be instructed to rebase tags, too?\" But an answer to the original question would also help.

5条回答
  •  再見小時候
    2020-11-30 10:54

    There is no built in way to do what you want using git. 'git rebase --tags' might be interesting but it does not exist.

    If the commit messages are identical as you say then you could go through each tag in refs/tags, do:

    'git log -1 --pretty=oneline '
    

    Compare the commit message to the full list:

    'git log --pretty=oneline '
    

    If you find a match (and the SHA1 hash is different) then do:

    'git tag --force  '
    

提交回复
热议问题