SORU
20 HAZİRAN 2012, ÇARŞAMBA


Git Bas hata: şube teslim güncellemek için reddediyor

Bazı çatışmalar birleştirme, sonra da kendini çözdüm Merhaba benim değişiklikler itmeye çalıştım ve aşağıdaki hatayı aldım:

c:\Program Files (x86)\Git\bin\git.exe push --recurse-submodules=check "origin" master:master
Done
remote: error: refusing to update checked out branch: refs/heads/master[K
remote: error: By default, updating the current branch in a non-bare repository[K
remote: error: is denied, because it will make the index and work tree inconsistent[K
remote: error: with what you pushed, and will require 'git reset --hard' to match[K
remote: error: the work tree to HEAD.[K
remote: error: [K
remote: error: You can set 'receive.denyCurrentBranch' configuration variable to[K
remote: error: 'ignore' or 'warn' in the remote repository to allow pushing into[K
remote: error: its current branch; however, this is not recommended unless you[K
remote: error: arranged to update its work tree to match what you pushed in some[K
remote: error: other way.[K
remote: error: [K
remote: error: To squelch this message and still keep the default behaviour, set[K
remote: error: 'receive.denyCurrentBranch' configuration variable to 'refuse'.[K
To C:/Development/GIT_Repo/Project
 ! [remote rejected] master -> master (branch is currently checked out)
error: failed to push some refs to 'C:/Development/GIT_Repo/Project'

Herkes bu hataya neden olabilir biliyor mu?

Teşekkürler

CEVAP
20 HAZİRAN 2012, ÇARŞAMBA


Depoların iki türü vardır: bare and non-bare

Çıplak depoları çalışma kopyası yok ve onları zorlayabilir. Bu Github olsun depoların türleri vardır! Eğer çıplak bir depo oluşturmak istiyorsanız, kullanabilirsiniz

git init --bare

Yani, Kısacası,olmayan çıplak bir depo için zorlayamazsınız(Edit: Evet, bir depo. kontrol edildi şu anda şube için zorlayabilir. Çıplak bir depo ile, hiçbiri işaretli olduğundan herhangi bir şube için zorlayabilir. Mümkün olsa da, sigara içilmez çıplak depoları için bastırıyor yaygın değil). Ne yapabilirim, getir ve diğer deposundan çıkarmaktır. Bu Github içinde görebilirsiniz pull request nasıl işliyor. Bunları çekmek için isteyin, ve kuvvet-itme-hayır, yok.


GüncellemeBu işaret için VonC sayesinde, en son gıt sürümleri (şu anda) 2.3.0, pushing to the checked out branch of a non-bare repositories is possible. Yine de, hala edemez bir baskirligüvenli bir işlem değildir çalışan ağaç, her neyse.

Bunu Paylaş:
  • Google+
  • E-Posta
Etiketler:

YORUMLAR

SPONSOR VİDEO

Rastgele Yazarlar

  • nemoking of kinges

    nemoking of

    4 EYLÜL 2009
  • WHZGUD2

    WHZGUD2

    21 EYLÜL 2011
  • wolfys you tube

    wolfys you t

    22 Kasım 2006