3

git rebase がどのように機能するかを理解するのは初めての試みでした。私は新しいブランチにいて、多くの変更を行ってから試してみgit rebaseました。その結果、次の出力が得られました。

$ git rebase master
First, rewinding head to replay your work on top of it...
Applying: new features done
/sandbox/.git/rebase-apply/patch:2825: trailing whitespace.
    var upl_div = document.getElementById('upload_form');
/sandbox/.git/rebase-apply/patch:2826: trailing whitespace.
    var crt_div = document.getElementById('create_form');
/sandbox/.git/rebase-apply/patch:2827: trailing whitespace.
    var appl_div = document.getElementById('create_letter');
warning: squelched 309 whitespace errors
warning: 314 lines add whitespace errors.
Using index info to reconstruct a base tree...
<stdin>:2825: trailing whitespace.
    var upl_div = document.getElementById('upload_form');
<stdin>:2826: trailing whitespace.
    var crt_div = document.getElementById('create_form');
<stdin>:2827: trailing whitespace.
    var appl_div = document.getElementById('create_letter');
warning: squelched 310 whitespace errors
warning: 309 lines applied after fixing whitespace errors.
Falling back to patching base and 3-way merge...
Auto-merging lib/functions_common.inc
Auto-merging .htaccess
Applying: new features done

そして、それが正常に作成されたことがわかりませんか?リベースまたはマージされましたか?何が起こったのですか?これらの警告を確認するにはどうすればよいですか?

4

1 に答える 1

5

リベースを行うと、git は一連のコミットを取得し、それぞれが導入した変更を順番に適用しようとします。(つまり、一連の の使用のようなgit cherry-pickものです。) これらの再適用のそれぞれは、git のマージ機構を使用して、新しい親に変更を再適用することによって発生する可能性のある競合を解決しようとする場合があります。

そうです、リベースを実行したばかりですが、リベースの各ステップでは、マージを実行するために git のコードを使用する必要があります。

「末尾の空白」警告は、変更を適用すると末尾に空白のある行が追加されたことを示すためにあります。git はこれに注意を払っており(電子メールで送信されたパッチで問題が発生する可能性があるため)、さまざまな状況でそのような空白について警告します。「押しつぶされた」エラーは、そのような警告を何百も出力するのではなく、1 行に押しつぶしたことを示しているだけです。

于 2012-10-22T08:55:03.593 に答える