سؤال

I mistakely created a branch ”sandbox” (with these ”), and when I try to delete it, i'm getting this message:

$ 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'

I tried to use urxvt as utf8 terminal.

I have githosting on bitbucket.org

Thanks Zopper

هل كانت مفيدة؟

المحلول

You can write the repository name safely in quotes (U+0022).

git push origin --delete "”sandbox”"
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top