2012-03-16 14 views
8

Çalışan bir ağaç ve çalışan ağaçla aynı dizinde .git klasörü olan normal bir repo'um var. - İş-ağaç seçeneğini git ile nasıl kullanırım? Hata alıyorum

Ben komuta

git --git-dir=/path/to/repo/.git --work-tree=/path/to/repo pull /some/other/repo master 

ile bu konumdan dışarıdan bir git komutu çalıştırmak çalışıyorum ama hata fatal: /usr/libexec/git-core/git-pull cannot be used without a working tree. alıyorum.

Neyi yanlış yapıyorum?

+0

Güncel çalışma dizininiz nedir? Git'in hangi sürümünü kullanıyorsunuz? –

+0

Bunun gibi: tüm dosyalar (çalışma ağacı) '/ some/repo' gibi bir klasörde bulunur ve bu klasörün içinde ayrıca bir .git klasörü'/some/repo/.git' bulunur. Normalde git komutlarını '/ some/repo' içinden çalıştırırım. 1.7.2.3 versiyonum var. – trusktr

cevap

9

Bu, Git'in önceki sürümlerindeki bir hatadır. 1.7.7.2 veya sonraki bir sürüme yükselttiğinizde bu sorun giderilmelidir. the commit that fixed the bug itibaren

:

You can't currently run git-pull or git-rebase from outside 
of the work tree, even with GIT_WORK_TREE set, due to an 
overeager require_work_tree function. Commit e2eb527 
documents this problem and provides the infrastructure for a 
fix, but left it to later commits to audit and update 
individual scripts. 

da commit e2eb527 bakınız.

İlgili konular