環境
Windows 10
SourceTree 3.3.4
やりたいこと
patchファイルを「完全なコミットとして取り込む」で取り込もうとしたらエラーが出てしまった
初回
git
-c diff.mnemonicprefix=false -c core.quotepath=false --no-optional-locks am -p 1 --3way
C:\Users\hoge\Documents\files\test\patch\20200415\syusei.patch
Applying: 【修正対応】テスト
Using index info to reconstruct a base tree...
M hoge/app/Controller/foo/HogeFugaController.php
Falling back to patching base and 3-way merge...
Auto-merging hoge/app/Controller/foo/HogeFugaController.php
CONFLICT (content): Merge conflict in hoge/app/Controller/foo/HogeFugaController.php
Patch failed at 0001 【修正対応】テスト
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch' to see the failed patch
エラー終了しました。エラーの内容は上記をご覧ください。
↓
2回目
git
-c diff.mnemonicprefix=false -c core.quotepath=false --no-optional-locks am -p 1 --3way
C:\Users\hoge\Documents\files\test\patch\20200415\syusei.patch
fatal: previous rebase directory .git/rebase-apply still exists but mbox given.
エラー終了しました。エラーの内容は上記をご覧ください。
再度SourceTreeいじってたらリベース状態のままになっていて、
下記エラーが表示されてできない作業があったので修正する
git -c diff.mnemonicprefix=false -c core.quotepath=false --no-optional-locks rebase --abort
fatal: It looks like 'git am' is in progress. Cannot rebase.
エラー終了しました。エラーの内容は上記をご覧ください。
やったこと
Git Bashにて下記コマンドを実行しリベースやり残し状態を解除
GitBash.sh
rm -rf .git/rebase-apply
もしくは.git内にあるrebase-applyを直接削除する
結果
リベース状態が解除される
GitBash.sh
eltociear@ELTOCIEAR-PC MINGW64 ~/Documents/develop (test/test_develop|AM 3/27)
$
↓
GitBash.sh
eltociear@ELTOCIEAR-PC MINGW64 ~/Documents/develop (test/test_develop)
$