SORU
8 NİSAN 2011, Cuma


Rebasing tüm çocuklar da dahil olmak üzere bir şube

Aşağıdaki Gıt depo topoloji var:

A-B-F (master)
   \   D (feature-a)
    \ /
     C (feature)
      \
       E (feature-b)

feature şube rebasing bütün alt (alt dalları da dahil olmak üzere) rebase bekliyordum:

$ git rebase feature master

A-B-F (master)
     \   D (feature-a)
      \ /
       C (feature)
        \
         E (feature-b)

Ancak, bu gerçek sonucudur:

      C' (feature)
     /
A-B-F (master)
   \   D (feature-a)
    \ /
     C
      \
       E (feature-b)

Kolayca elle yürüterek düzeltebilirim biliyorum:

$ git rebase --onto feature C feature-a
$ git rebase --onto feature C feature-b

Ama onun çocukları/torunları dahil olmak üzere otomatik olarak rebase şube için bir yol var mı?

CEVAP
12 NİSAN 2011, Salı


git branch --contains C | \
xargs -n 1 \
git rebase --committer-date-is-author-date --preserve-merges --onto B C^

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

YORUMLAR

SPONSOR VİDEO

Rastgele Yazarlar

  • ChasesAndCrashes

    ChasesAndCra

    31 Temmuz 2009
  • FUNKER530 - Veteran Community & Combat Footage

    FUNKER530 -

    25 Ocak 2007
  • Learn Math Tutorials

    Learn Math T

    20 Kasım 2011