2013-06-11 24 views
15

Varsayılan olmayan dalları izleyen bir repo'um var. Yani, "orijin/master-13.07" yi takip etmesi gereken "master" adlı yerel bir şube var. "Push -u" yaptım ve yeterli olduğuna inanıyorum, şube izlenir. git branch -vv Çıktı: git statusgit farklı bir isimle şube izle

C:\work\repo>git status 
# On branch master 
# Your branch is ahead of 'origin/master-13.07' by 1 commit. 
# (use "git push" to publish your local commits) 
# 
nothing to commit, working directory clean 

All

C:\work\repo>git branch -vv 
    stuff  68792df [origin/stuff-13.07] Small bugfix 
* master 68792df [origin/master-13.07: ahead 1] Small bugfix 

Çıktı tamam görünüyor, ama sadece "git push" (git yukarıda beni önerir gibi) kullandığınızda, başarısız:

C:\work\repo>git push 
fatal: The upstream branch of your current branch does not match 
the name of your current branch. To push to the upstream branch 
on the remote, use 

    git push origin HEAD:master-13.07 

To push to the branch of the same name on the remote, use 

    git push origin master 

Evet, ismin eşleşmediğini biliyorum, bu tam olarak istediğim şeydi ve "push -u" ile gitmesini söyledim. Neden sadece "itme" kullanamıyorum?

C:\work\repo>git --version 
git version 1.8.3.msysgit.0 

C:\work\repo>git config push.default 
simple 
+0

Hangi Git sürümünü kullanıyorsunuz? "Push.default" seçeneğini ayarladınız mı? –

+0

@GuillaumeDarmont – kan

+0

@GuillaumeDarmont hakkında soru ekledim. Seems çözümü 'push.default'' upstream' olarak değiştirmektir. Teşekkürler. – kan

cevap

16

Tamam. Eklediğiniz bilgilerle, upstream değerini değiştirmek için push.default'u değiştirmeniz gerektiğini düşünüyorum.

Muhtemelen bu mesajı Git yükseltme ve gördükten sonra gerçek değerini yapılandırılmış:

warning: push.default is unset; its implicit value is changing in 
Git 2.0 from 'matching' to 'simple'. To squelch this message 
and maintain the current behavior after the default changes, use: 

    git config --global push.default matching 

To squelch this message and adopt the new behavior now, use: 

    git config --global push.default simple 

belgelerine göre şube isimleri farklı olduğunda, değer simple bir itme reddetmek zorundadır. Bakınız Git Config (push.default için arama).