Я хотел бы нажать мой код на Gerrit. Я добавил эти строки в моем ~/.gitconfigНажмите на ошибку команды gerrit, запрещенную Gerrit
[remote "origin"]
url = ssh://[email protected]:29418/project/cloud
fetch = +refs/heads/*:refs/remotes/origin/*
push = refs/heads/*:refs/for/*
Когда я нажимаю в моем исходном дереве, я получил сообщение об ошибке:
'git -c diff.mnemonicprefix=false -c core.quotepath=false -c credential.helper=sourcetree push -v origin refs/heads/master:refs/heads/refs/for/master
Pushing to ssh://[email protected]:29418/project/cloud
remote:
remote: Processing changes: refs: 1
remote: Processing changes: refs: 1, done
To ssh://[email protected]:29418/project/cloud
! [remote rejected] master -> refs/for/master (prohibited by Gerrit)
error: failed to push some refs to
ssh://[email protected]:29418/project/cloud
Pushing to ssh://[email protected]:29418/project/cloud
remote:
remote: Processing changes: refs: 1
remote: Processing changes: refs: 1, done
To ssh://[email protected]:29418/project/cloud! [remote rejected] master ->
refs/for/master (prohibited by Gerrit)
error: failed to push some refs to ssh://[email protected]:29418/project/cloud
Completed with errors, see above
Кажется, мой sourcetree отправить толчок дважды. Также команда неправилен:
git -c diff.mnemonicprefix=false -c core.quotepath=false -c credential.helper=sourcetree push -v origin refs/heads/master:refs/heads/refs/for/master
кажется правильная команда должна быть:
git -c diff.mnemonicprefix=false -c core.quotepath=false -c credential.helper=sourcetree push -v origin master:refs/for/master
, где моя ошибка в моей конфигурации?
Заранее спасибо.
Кажется, sourcetree добавил refs/heads в мою команду. Как удалить этот префикс в моей команде? – user3034559