2012-11-13 14 views
49

जब मैं एक दूरस्थ शाखा के साथ अपनी शाखा मर्ज करने के लिए कोशिश कर एक स्वैप फ़ाइल:मिले नाम

E325: ATTENTION 
Found a swap file by the name ".git/.MERGE_MSG.swp" 
      owned by: xxxxxx dated: Mon Nov 12 23:17:40 2012 
     file name: ~xxxxxx/Desktop/My-ios-App/.git/MERGE_MSG 
      modified: YES 
     user name: xxxxxx host name: unknown-b8-8d-12-22-27-72.lan 
     process ID: 1639 
While opening file ".git/MERGE_MSG" 
      dated: Tue Nov 13 14:06:48 2012 
     NEWER than swap file! 

(1) Another program may be editing the same file. 
    If this is the case, be careful not to end up with two 
    different instances of the same file when making changes. 
    Quit, or continue with caution. 

(2) An edit session for this file crashed. 
    If this is the case, use ":recover" or "vim -r .git/MERGE_MSG" 
    to recover the changes (see ":help recovery"). 
    If you did this already, delete the swap file ".git/.MERGE_MSG.swp" 
    to avoid this message. 

Swap file ".git/.MERGE_MSG.swp" already exists! 
[O]pen Read-Only, (E)dit anyway, (R)ecover, (D)elete it, (Q)uit, (A)bort: 

इस के साथ कैसे निपटने के लिए:

git merge feature/remote_branch 

मैं इस संदेश को मिल गया?

उत्तर

52

ऐसा लगता है कि आपके पास git commit या git merge चल रहा है, और एक संपादक अभी भी प्रतिबद्ध संदेश संपादित कर रहा है।

दो विकल्प:

  1. सत्र का पता लगाएं और खत्म यह (बेहतर)।
  2. .swp फ़ाइल हटाएं (यदि आपको यकीन है कि अन्य गिट सत्र दूर चला गया है)।
+5

यह .swp फ़ाइल कैसे ढूंढें? – user3400881

+4

"सत्र" कैसे ढूंढें - इसका क्या अर्थ है? – RUKAclMortality

0

मुझे ऐसी शाखा में परिवर्तन खींचने की कोशिश करते समय भी यह त्रुटि हुई है, जो अपस्ट्रीम शाखा से नहीं बनाई गई है, जिससे मैं खींचने की कोशिश कर रहा हूं।

जैसे - इस नदी के ऊपर

git checkout upstream/night-version -b testnightversion 

की night-version मिलान यह जो नदी के ऊपर की master शाखा से मेल खाता है स्थानीय में एक शाखा testmaster बनाता है एक नई शाखा बनाता है।

git checkout upstream/master -b testmaster 

अब अगर मैं इस त्रुटि को testmaster शाखा को लीड में night-version के परिवर्तन खींचने की कोशिश।

git pull upstream night-version //while I'm in `master` cloned branch 

मैंने उचित शाखा में नेविगेट करके और परिवर्तनों को खींचकर इसे हल करने में कामयाब रहे।

git checkout testnightversion 
git pull upstream night-version // works fine. 
संबंधित मुद्दे