次のコマンドを実行した後:
git init
touch README
git add README
git commit -m "Initial Commit"
git branch b01_02_03
git checkout b01_02_03
echo "Data 1" >> f1 && git add f1 && git commit -m "Add 01"
echo "Data 2" >> f2 && git add f2 && git commit -m "Add 02"
echo "Data 3" >> f3 && git add f3 && git commit -m "Add 03"
git checkout master
git branch b04_05
git checkout b04_05
echo "Data 4" >> f4 && git add f4 && git commit -m "Add 04"
echo "Data 5" >> f5 && git add f5 && git commit -m "Add 05"
git checkout master
git merge --ff-only b01_02_03
git checkout b04_05
次のテスト ツリーを作成します。
* 8294414 (HEAD, b04_05) add 05
* 19f920f add 04
| * 3a2ca64 (master, b01_02_03) add 03
| * 49d1aca add 02
| * c8f6d30 add 01
|/
* 7f0ca8e initial commit
私は走っています
git rebase master
次の出力を取得します。
First, rewinding head to replay your work on top of it...
Applying: add 04
/opt/swt/install/git-1.7.12.3/libexec/git-core/git-am: line 115: /home9/tclarke/git-puzzles-1/.git/rebase-apply/next: cannot overwrite existing file
/opt/swt/install/git-1.7.12.3/libexec/git-core/git-am: line 665: 1: cannot overwrite existing file
/opt/swt/install/git-1.7.12.3/libexec/git-core/git-am: line 666: 1: cannot overwrite existing file
/opt/swt/install/git-1.7.12.3/libexec/git-core/git-am: line 712: 1: cannot overwrite existing file
Applying: add 04
/opt/swt/install/git-1.7.12.3/libexec/git-core/git-am: line 115: /home9/tclarke/git-puzzles-1/.git/rebase-apply/next: cannot overwrite existing file
結果は次のとおりです。
* c88b1f0 (HEAD, b04_05) add 04
* 761c779 add 04
* 3a2ca64 (master, b01_02_03) add 03
* 49d1aca add 02
* c8f6d30 add 01
* 7f0ca8e initial commit
リベースは成功しましたが、ログが台無しになり、ログ「add 05」は以前のものと同じになります。これは、作成した新しい git リポジトリの別のファイルスペースにある別のマシンで再現可能です。私の隣人は、同一の木で同じ問題を抱えていません。
これを解決する方法についてアドバイスはありますか?