SORU
1 NİSAN 2010, PERŞEMBE


Nasıl iki içine işleyen birleştirebilir miyim?

Birleştirmeye çalışıyorum 2 1, “squashing commits with rebase” from git ready takip ettim içine işliyor.

Koştum

git rebase --interactive HEAD~2

Sonuç düzenleyicisinde, I squash pick değiştirin ve sonra da Kaydet-çık, ama rebase hata ile başarısız olur

'Squash' bir önceki etmeden teslim olmak

Çalışma ağacımı bu devlet ulaştığını şimdi, ben Manifoldlar;m dertten kurtarmak zorunda. Komutu git rebase --interactive HEAD~2 ile başarısız olur

İnteraktif rebase çoktan başladı

ve git rebase --continue ile başarısız olur

'Squash' bir önceki etmeden teslim olmak

CEVAP
2 NİSAN 2010, Cuma


Tekrar başladığın yere

$ git rebase --abort

Geçmişiniz olduğunu söylüyorlar

$ git log --pretty=oneline
a931ac7c808e2471b22b5bd20f0cad046b1c5d0d c
b76d157d507e819d7511132bdb5a80dd421d854f b
df239176e1a2ffac927d8b496ea00d5488481db5 a

Bu, bir commit, sonra b ve en sonunda ilk c idi.

git rebase --interactive HEAD~2 çalışan bir editör ile verir

pick b76d157 b
pick a931ac7 c

# Rebase df23917..a931ac7 onto df23917
#
# 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
#
# If you remove a line here THAT COMMIT WILL BE LOST.
# However, if you remove everything, the rebase will be aborted.
#

B pick 14 ** değiştirmek için metni değiştirerek gördün, ama bunun yerine b c ezilip eğer hata neden olur

pick b76d157 b
s a931ac7 c

ve çıkarken Kaydet editörü olan başka bir editör olursun

# This is a combination of 2 commits.
# The first commit's message is:

b

# This is the 2nd commit message:

c

Kaydedin ve çıkın, düzenlenmiş dosya içeriğini yeni kombine tamamlama: mesaj taahhüt olur

$ git log --pretty=oneline
18fd73d3ce748f2a58d1b566c03dd9dafe0b6b4f b and c
df239176e1a2ffac927d8b496ea00d5488481db5 a

Bunu Paylaş:
  • Google+
  • E-Posta
Etiketler:
Git

YORUMLAR

SPONSOR VİDEO

Rastgele Yazarlar

  • Good Creative Academy

    Good Creativ

    19 Kasım 2009
  • Tianna Sierra Dance

    Tianna Sierr

    16 EYLÜL 2013
  • wafflepwn

    wafflepwn

    14 AĞUSTOS 2008