2013-08-13 25 views
9

ile birlikte işlenirken hata 2 taahhüt yeniden sipariş etmeye çalışıyorum ve herhangi bir açıklama yapmadan bir hata almaya devam ediyorum, bu yüzden yanlış yaptığım konusunda hiçbir fikrim yok.Yeniden sıralama, git rebase -i

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

Ben 132247f ve 0ddaef3 takas istiyorum:

Bu

repo olduğunu.

$ git rebase -i 95f8007 

Bu nano içine beni alır:

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 

ben hem satırları takas, kaydetmek ve çıkış. Bu hata mesajı alıyorum edilir:

bir hata mesajı olarak
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 

, bu herkes ne olup bittiğini biliyor .... çok kullanışlı değil mi?

$ 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 
: Ben çatışmayı çözmek durumunda

$ 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 

, dosya ve çalıştırın git, ben bu başka hatalar --continue olsun rebase ekleyin:

repo tek dosya çatışma gibi görünüyor

Bu beni delirtiyor, herhangi bir yardım için teşekkür ederiz.

+0

Dosyayı yeniden dizine eklediğinizden emin misiniz? Eğer "rebase" yapmazsanız, hala dosyayı çakışma içinde değerlendirirsiniz. – JaredPar

+0

Git -rebase -i'den önce dosyayı eklemeniz gerekiyor mu? – cfischer

+0

Hayır, yeniden biçimlendirmeden önce dosyayı eklemeniz gerekmemelidir ve 'git rebase --continue ', çakışmayı çözdükten sonra herşeyi halletmelidir. – quantka

cevap

13

Olması gereken şey, "Döndürülmüş renkleri html'ye" uyguladığınızda ilk birleştirme çakışmasını başarılı bir şekilde çözdüğünüze göre, bir sonraki "Eklenen son cümleler" ifadesini uygularken bir başka birleştirme çakışması çarptı.

Birleştirme çakışmalarının neler olduğunu görmek için git status numaralı ürüne başvurun, bunları çözün ve ardından git rebase --continue ile devam edin.

+0

Belki de gözden geçirme revizyonuna bağlıdır, fakat bazen git, harekete geçmeden devam edemeyeceğiniz gibi ses çıkarmanızı sağlayan korkutucu bir mesaj yayar, ancak size yapmanız gereken şeyin doğasını söylemez. Şube üzerinde iki işin ana üzerinde tek bir taahhüt şeklinde hâlihazırda ustalaştığı inancımın olduğu bir durum vardı. Böylece rebase -i master'a başladım ve iki işi de todolamanın başlangıcına taşıdım ve ikincisini düzelttim. Hiçbir önerilen düzeltme, durum yokken korkutucu "uygulamıyor" mesajı aldım. Ben rebase - yine de devam ettim ve çalıştı. –

+0

Ve "çalıştım" ile rebaseimin her iki işi de elimine ettiği anlamına gelir. –

İlgili konular