Git merge時に、.local 以下を merge 対象外にするために、
yama@jpx20120007:/tmp/yama$ cat .gitattributes /.local/* merge=ours yama@jpx20120007:/tmp/yama$ cat .git/config [core] repositoryformatversion = 0 filemode = true bare = false logallrefupdates = true [remote "origin"] url = yama@XXX.XXX.XXX.XXX:/git_repository/home.git fetch = +refs/heads/*:refs/remotes/origin/* [branch "master"] pushRemote = origin remote = origin merge = refs/heads/master [merge "ours"] name = "Keep ours merge" driver = true
とし、git merge すると
yama@jpx20120007:/tmp/yama$ git merge -v fatal: refusing to merge unrelated histories
となって、merge が失敗するので、
--allow-unrelated-histories オプションをつけて、merge 実行すると
yama@jpx20120007:/tmp/yama$ git merge -v --allow-unrelated-histories ... Auto-merging .local/share/fish/generated_completions/zdump.fish CONFLICT (add/add): Merge conflict in .local/share/fish/generated_completions/zdump.fish Auto-merging .local/share/fish/generated_completions/x509.fish CONFLICT (add/add): Merge conflict in .local/share/fish/generated_completions/x509.fish Auto-merging .local/share/fish/generated_completions/wipefs.fish CONFLICT (add/add): Merge conflict in .local/share/fish/generated_completions/wipefs.fish Auto-merging .local/share/fish/generated_completions/who.fish ... Automatic merge failed; fix conflicts and then commit the result.
となって、
.local以下のファイルが、merge されてしまいます。
.local以下をmerge時の対象外にするにはどのようにすればよいかご教示お願いします。
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。