2010-05-14 12 views
25

मैंने प्रासंगिक धागे की जांच की लेकिन अभी भी यह पता नहीं लगाया जा सकता कि दृश्यों के पीछे क्या चल रहा है।गिट। रिमोट हेड संदिग्ध है

जब मैं git remote show origin टाइप किया, मुझे मिल गया:

* remote origin 
    Fetch URL: xxxx 
    Push URL: xxxx 
    HEAD branch (remote HEAD is ambiguous, may be one of the following): 
    development 
    master 
    Remote branches: 
    development tracked 
    master  tracked 
    Local branches configured for 'git pull': 
    development merges with remote development 
    master  merges with remote master 
    Local ref configured for 'git push': 
    master pushes to master (up to date) 

मैं भी git show-ref जाँच की, और मुझे मिल गया:

3f8f4292e31cb8fa5938dbdd406b2f357764205b refs/heads/development 
3f8f4292e31cb8fa5938dbdd406b2f357764205b refs/heads/master 
3f8f4292e31cb8fa5938dbdd406b2f357764205b refs/remotes/origin/development 
3f8f4292e31cb8fa5938dbdd406b2f357764205b refs/remotes/origin/master 

यहाँ मैं सभी शाखाओं git branch -a को क्रियान्वित करते हुए की सूची है:

development 
* master 
    remotes/origin/development 
    remotes/origin/master 

और यह .git/config में है:

[core] 
    repositoryformatversion = 0 
    filemode = false 
    bare = false 
    logallrefupdates = true 
    ignorecase = true 
    hideDotFiles = dotGitOnly 
    autocrlf = false 
[remote "origin"] 
    fetch = +refs/heads/*:refs/remotes/origin/* 
    url = xxxx 
    push = refs/heads/master:refs/heads/master 
[branch "master"] 
    remote = origin 
    merge = refs/heads/master 
[branch "development"] 
    remote = origin 
    merge = refs/heads/development 

ऐसा लगता है कि दूरस्थ विकास और मास्टर शाखा एक ही नोड साझा करती है। मैं इस अस्पष्टता की समस्या को कैसे हल करूं?

उत्तर

41

आपके रिमोट रिपोज़ में कुछ भी गलत नहीं है। गिट आपको बताता है कि "रिमोट हेड संदिग्ध है" क्योंकि मास्टर और विकास दोनों में एक ही SHA1 हैश है। यदि आपने मास्टर से विकास को अभी ब्रांच किया है, तो यह होना चाहिए।

मास्टर या विकास के लिए कुछ करने की कोशिश करें और इसे मूल पर धक्का दें; कि "संदिग्ध" संदेश चलेगा, और जो भी शाखा आपने अभी प्रतिबद्ध की है वह रिमोट हेड शाखा बन जाएगी।

संबंधित मुद्दे