2014-01-14 3 views
6

Я очень новичок, когда дело доходит до GIT. Здесь я попытался объяснить мой сценарий ошибок. Пожалуйста, помогите мне с точной командой.! [remote reject] master -> master (ветвь в настоящий момент проверена) Ошибка в git

Мне нужно очистить хранилище в удаленном местоположении GIT. И у меня есть только разрешение клонировать их и нажимать на них свои изменения. У меня нет разрешения на прямой доступ в GIT Remote. Репо. funder-sceduler.git и funder-request.git. Подробный путь для них:

  1. SSH: //[email protected]/apps/git/web-platform/dotcms/modules/funder-request.git
  2. SSH: // [email protected]/apps/git/web-platform/dotcms/modules/funder-scheduler.git

Теперь я клонировал Funder-scheduler.git в моем местном. Я добавил свои изменения. Затем я совершил GIT. Then git кнопка изначальный тормоз. Все нормально.

Но когда я делаю то же самое для финансирующей-request.git, после выполнения команды «мерзавец толчок мастера происхождения» его метания следующее сообщение об ошибке:

>$ git push origin master 
>Enter passphrase for key '/u/.ssh/id_rsa': 
>Counting objects: 81, done. 
>Compressing objects: 100% (61/61), done. 
>Writing objects: 100% (81/81), 215.86 KiB | 126.00 KiB/s, done. 
>Total 81 (delta 4), reused 0 (delta 0) 
>remote: error: refusing to update checked out branch: refs/heads/master 
>remote: error: By default, updating the current branch in a non-bare repository 
>remote: error: is denied, because it will make the index and work tree inconsist 
ent 
>remote: error: with what you pushed, and will require 'git reset --hard' to matc 
h 
>remote: error: the work tree to HEAD. 
>remote: error: 
>remote: error: You can set 'receive.denyCurrentBranch' configuration variable to 

>remote: error: 'ignore' or 'warn' in the remote repository to allow pushing into 

>remote: error: its current branch; however, this is not recommended unless you 
>remote: error: arranged to update its work tree to match what you pushed in some 

>remote: error: other way. 
>remote: error: 
>remote: error: To squelch this message and still keep the default behaviour, set 

>remote: error: 'receive.denyCurrentBranch' configuration variable to 'refuse'. 
To ssh://[email protected]/apps/git/web-platform/dotcms/modules/funder- 
request.git 
! [remote rejected] master -> master (branch is currently checked out) 
error: failed to push some refs to 'ssh://[email protected]/apps/git/we 
b-platform/dotcms/modules/funder-request.git' 

с просьбой помочь мне с точной командой, чтобы решить эту проблему , Я не понимаю теоретического объяснения, и я сожалею об этом

ответ

4

Похоже, funder-request.git не является голой репо, то есть имеет рабочее дерево (файлы, которые поступают из проверки ветки).

См «all about "bare" repos -- what, why, and how to fix a non-bare push» больше:
Использования без голого репо влечет за собой риск сделать содержание рабочего дерева синхронизировано с содержанием самого мерзавца репо.

Вам необходимо связаться с администратором этого сервера и сделать его конвертированным в голый репо.
См. "How to convert a git repository from normal to bare ?".

+0

Благодарим вас, его кажется идеальным. – user3052178

Смежные вопросы