如何删除名称中包含无效字符的分支?

时间:2011-11-01 11:06:15

标签: git bitbucket invalid-characters

我错误地创建了一个分支“sandbox”(带有这些“),当我尝试删除它时,我收到了这条消息:

$ git push origin :”sandbox”
remote: Traceback (most recent call last):
remote:   File     "/opt/python/domains/bitbucket.org/current/bitbucket/scripts/git/hooks/pre-receive", line 12, in <module>
remote:     sys.exit(prehooks.githooks())
remote:   File "/data/vol1/www/venvs/deployed/bitbucket/apps/repo2/git.py", line 1197, in wrapper
remote:     sha = repo._repo.lookup_reference(refname).sha
remote: pygit2.GitError: Failed to lookup reference 
remote:     - Failed to normalize name. Reference name contains invalid characters
To ssh://git@bitbucket.org/user/git-repo.git
 ! [remote rejected] ”sandbox” (pre-receive hook declined)
error: failed to push some refs to 'ssh://git@bitbucket.org/user/git-repo.git'

我尝试将urxvt用作utf8终端。

我在bitbucket.org上有githosting

由于 Zopper

1 个答案:

答案 0 :(得分:1)

您可以使用引号(U + 0022)安全地编写存储库名称。

git push origin --delete "”sandbox”"