2013-08-13 5 views
9

मैं 2 कामों को पुन: व्यवस्थित करने की कोशिश कर रहा हूं, और मुझे बिना किसी स्पष्टीकरण के त्रुटि मिल रही है, इसलिए मुझे नहीं पता कि मैं क्या गलत कर रहा हूं।रीडॉर्डरिंग गिट रीबेज के साथ काम करता है -i

$ git lol 
* c0000ca (HEAD, master) added a title 
* 132247f Turned colors to html 
* 0ddaef3 Added last sentences 
* 95f8007 initial commit 

मैं 132247f और 0ddaef3 स्वैप करने के लिए चाहते हैं:

इस रेपो है।

$ git rebase -i 95f8007 

यह मैं नैनो में ले जाता है:

pick 0ddaef3 Added last sentences 
pick 132247f Turned colors to html 
pick c0000ca added a title 

# Rebase 95f8007..c0000ca onto 95f8007 
# 
# Commands: 
# p, pick = use commit 
# r, reword = use commit, but edit the commit message 
# e, edit = use commit, but stop for amending 
# s, squash = use commit, but meld into previous commit 
# f, fixup = like "squash", but discard this commit's log message 
# x, exec = run command (the rest of the line) using shell 
# 
# These lines can be re-ordered; they are executed from top to bottom. 
# 
# If you remove a line here THAT COMMIT WILL BE LOST. 
# However, if you remove everything, the rebase will be aborted. 
# 
# Note that empty commits are commented out 

मैं दोनों लाइनों स्वैप, बचाने के लिए और बाहर निकलने के। यह त्रुटि संदेश मुझे मिलता है:

error: could not apply 132247f... Turned colors to html 


When you have resolved this problem, run "git rebase --continue". 
If you prefer to skip this patch, run "git rebase --skip" instead. 
To check out the original branch and stop rebasing, run "git rebase --abort". 
Could not apply 132247f... Turned colors to html 

एक त्रुटि संदेश के रूप में, यह बहुत उपयोगी नहीं है .... कोई जानता है कि क्या हो रहा है?

$ git rebase --continue 
[detached HEAD 9aba127] Turned colors to html 
1 file changed, 4 insertions(+), 2 deletions(-) 
error: could not apply 0ddaef3... Added last sentences 

When you have resolved this problem, run "git rebase --continue". 
If you prefer to skip this patch, run "git rebase --skip" instead. 
To check out the original branch and stop rebasing, run "git rebase --abort". 
Could not apply 0ddaef3... Added last sentences 
:

$ cat poem.md 
<<<<<<< HEAD 
Roses are red. 
Violets are blue. 

======= 
Roses are #ff0000. 
Violets are #0000ff. 
All of my bases, 
are belong to you. 
>>>>>>> 132247f... Turned colors to html 

अगर मैं संघर्ष का समाधान, फ़ाइल और रन Git rebase --continue, मैं इस त्रुटि मिलती है अन्य जोड़ें:

रेपो में केवल फ़ाइल संघर्ष में हो रहा है

यह मुझे पागल कर रहा है, किसी भी मदद की सराहना की जाती है।

+0

क्या आपने फ़ाइल को वापस इंडेक्स में जोड़ना सुनिश्चित किया है? यदि आप 'रीबेज' नहीं करते हैं तो भी फ़ाइल – JaredPar

+0

में फ़ाइल पर विचार करेगा, आपको git -rebase -i से पहले फ़ाइल जोड़ना होगा? – cfischer

+0

कोई भी आपको रिबेज करने से पहले फ़ाइल को जोड़ने की ज़रूरत नहीं है और 'गिट रीबेज --continue' को संघर्ष का समाधान करने के बाद सबकुछ का ख्याल रखना चाहिए। – quantka

उत्तर

13

ऐसा लगता है कि क्या हो रहा है यह है कि "एचटीएमएल में टर्न किए गए रंग" को लागू करते समय आपने पहले विलय संघर्ष को सफलतापूर्वक हल किया है, फिर अगली प्रतिबद्धता को लागू करते समय एक और विलय संघर्ष मारा "अंतिम वाक्य जोड़ा गया"।

मर्ज विवादों को देखने के लिए बस git status करें, उन्हें हल करें, फिर git rebase --continue के साथ जारी रखें।

+0

हो सकता है कि यह गिट संशोधन पर निर्भर करता है लेकिन कभी-कभी गिट एक डरावनी दिखने वाला संदेश निकलता है जो इसे ध्वनि बनाता है जैसे कि आप पहले बिना कार्रवाई किए जारी रख सकते हैं, लेकिन यह आपको यह नहीं बताता कि आपको क्या करना है। मुझे बस एक परिस्थिति थी जहां यह मेरा विश्वास था कि मेरी शाखा पर दो काम मास्टर पर एक ही प्रतिबद्धता के रूप में पहले से ही मास्टर पर थे। तो मैंने रीबेज-मास्टर पर शुरुआत की और दो कामों को टोडो की शुरुआत में ले जाया और दूसरा फिक्सअप किया। मुझे डरावना "आवेदन नहीं कर सकता" संदेश कोई सुझाव नहीं दिया गया, कोई स्थिति नहीं है। मैंने rebase किया - वैसे भी जारी रखें और यह काम किया। –

+0

और "काम" से मेरा मतलब है कि मेरी रिबेस ने दोनों को समाप्त कर दिया। –

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