2014-01-14 13 views
6

GITに関しては非常に初心です。ここで私のエラーシナリオを説明しようとしました。正確なコマンドで私を助けてください。! [リモートで拒否されました] master - > master(ブランチは現在チェックアウトされています)gitのエラー

GITのリモートロケーションでリポジトリを空にする必要があります。私はそれらをクローンし、私の変更をそれらにプッシュする権限しかありません。 GIT Remoteに直接アクセスする許可はありません。 レポはあります。 funder-sceduler.gitとfunder-request.git。彼らのために 詳細なパス:

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

は今、私は私の地元で資金提供者-scheduler.gitをクローン化しました。私は変更を加えました。それから私はGITをコミットしました。 次にgit push origin masterを入力します。 正常に動作しました。

しかし、私は資金提供者-request.git、コマンドを実行した後に「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」:
非裸のレポを使用するには、gitのレポ自体の内容と同期して作業ツリーのコンテンツを作るのリスクを伴います。

そのサーバーの管理者に連絡し、裸のレポに変換する必要があります。
How to convert a git repository from normal to bare ?」を参照してください。

+0

フォンありがとう、それは完璧と思われます。 – user3052178

関連する問題