Sen*_*ful 93 git push atlassian-sourcetree
尝试通过源树推送时,我收到以下错误:
git -c diff.mnemonicprefix=false -c core.quotepath=false -c credential.helper=sourcetree push -v --tags origin refs/heads/master:refs/heads/master
Pushing to https://user@github.com/repo.git
To https://user@github.com/repo.git
= [up to date] master -> master
...
! [rejected] example_tag -> example_tag (already exists)
updating local tracking ref 'refs/remotes/origin/master'
error: failed to push some refs to 'https://user@github.com/repo.git'
hint: Updates were rejected because the tag already exists in the remote.
Completed with errors, see above
Run Code Online (Sandbox Code Playgroud)
据我所知,我没有对这个标签做任何改动.我怎样才能解决这个问题?
byt*_*dev 184
您还应该能够在git bash中解决此问题(单击Source Tree UI中的"Terminal"按钮).类型:
git pull --tags
Run Code Online (Sandbox Code Playgroud)
Sen*_*ful 107
如果您没有对要保留的标记进行任何本地更改,则可以删除因已存在而被拒绝的标记(example_tag
在本例中):
这在SourceTree中很常见的原因是因为默认情况下Push all tags选项设置为on.(隐藏此错误的另一种方法是取消选中该选项.)
git pull --tags
效果很好,但有时即使使用此命令也会出现错误。错误消息示例:
! [rejected] example_tag -> example_tag (would clobber existing tag)
Run Code Online (Sandbox Code Playgroud)
这可以通过以下命令解决: git pull --tags -f
资源:
https://github.com/concourse/git-resource/issues/233
归档时间: |
|
查看次数: |
49277 次 |
最近记录: |