2

git rebase追加したすべての行を保持して、.csproj ファイルを自動的にマージしたい:

mkdir example
cd example

git init
echo "*.csproj text merge=union" > .gitattributes
echo "hello" > sample.csproj
git add -A
git commit -m "initial commit"

git branch test
git checkout test
echo "from test" >> sample.csproj
git add -A
git commit -m "from test"

git checkout master
echo "from master" >> sample.csproj
git add -A
git commit -m "from master"

git rebase test

2 つの問題があります。まず、これはバイナリ警告で失敗します:

Falling back to patching base and 3-way merge...
warning: Cannot merge binary files: sample.csproj (HEAD vs. from master)
Auto-merging sample.csproj
CONFLICT (content): Merge conflict in sample.csproj
Failed to merge in the changes.

2番目の問題は、ファイルがテキストであると正しく判断されますが(理由はわかりません)、私の他のレポにありますが、それでもマージに失敗します。

Falling back to patching base and 3-way merge...
Auto-merging Source/App/TRPS.Build/TRPS.Build.csproj
CONFLICT (content): Merge conflict in Source/App/TRPS.Build/TRPS.Build.csproj
Failed to merge in the changes.
4

0 に答える 0