昨日マスターから作成されたgitブランチ(v4と呼ばれる)があります。マスターにはいくつかの変更があり、v4に入れたいと思っています。そのため、v4では、マスターからリベースを実行しようとしましたが、1つのファイルで問題が発生し続けます。バージョン番号を含む1行のテキストファイルです。このファイルはapp/views/common/version.txt
、リベース前に次のテキストが含まれています。
v1.4-alpha-02
これが私がしていることです:
> git rebase master
First, rewinding head to replay your work on top of it...
Applying: new version, new branch
error: patch failed: app/views/common/version.txt:1
error: app/views/common/version.txt: patch does not apply
Using index info to reconstruct a base tree...
Falling back to patching base and 3-way merge...
Auto-merging app/views/common/version.txt
CONFLICT (content): Merge conflict in app/views/common/version.txt
Failed to merge in the changes.
Patch failed at 0001 new version, new branch
When you have resolved this problem run "git rebase --continue".
If you would prefer to skip this patch, instead run "git rebase --skip".
To restore the original branch and stop rebasing run "git rebase --abort".
今version.txt
は次のようになります。
<<<<<<< HEAD:app/views/common/version.txt
v1.4-alpha-02
=======
v1.4-alpha-01
>>>>>>> new version, new branch:app/views/common/version.txt
だから、私はそれを片付けます、そしてそれは今このように見えます:
v1.4-alpha-02
それから私は続けようとしました:最初に私はコミットを試みます:
> git commit -a -m "merged"
# Not currently on any branch.
nothing to commit (working directory clean)
運がない。だから、私はファイルを追加しようとしていました:
git add app/views/common/version.txt
応答なし。良いニュースはないでしょう。だから、私は続けようとします:
> git rebase --continue
Applying: new version, new branch
No changes - did you forget to use 'git add'?
When you have resolved this problem run "git rebase --continue".
If you would prefer to skip this patch, instead run "git rebase --skip".
To restore the original branch and stop rebasing run "git rebase --abort".
この時点で、これをぐるぐる回った後、私は机から頭を叩いています。
何が起きてる?私は何が間違っているのですか?誰かが私をまっすぐに設定できますか?
編集-unutbuの場合
あなたが提案したようにファイルを変更しましたが、同じエラーが発生します:
> git rebase master
First, rewinding head to replay your work on top of it...
Applying: new version, new branch
error: patch failed: app/views/common/version.txt:1
error: app/views/common/version.txt: patch does not apply
Using index info to reconstruct a base tree...
Falling back to patching base and 3-way merge...
Auto-merging app/views/common/version.txt
CONFLICT (content): Merge conflict in app/views/common/version.txt
Failed to merge in the changes.
Patch failed at 0001 new version, new branch
When you have resolved this problem run "git rebase --continue".
If you would prefer to skip this patch, instead run "git rebase --skip".
To restore the original branch and stop rebasing run "git rebase --abort".