After moving a submodule in a development branch, I get a merge conflict 
every time I merge changes up from the master branch. To resolve, I must git 
add mysubmodule. How can I avoid resolving this conflict every time I merge 
up?  Here is a script which illustrates the problem:

cd ~/src
git init MyProduct
git init MySubmodule
cd MySubmodule
echo "foo" > foo.txt
git add foo.txt
git commit -m "Add foo.txt"
cd ../MyProduct
echo "bar" > bar.txt
git add bar.txt
git commit -m "Add bar.txt"
git submodule add ../MySubmodule
git commit -m "Add MySubmodule"
git branch development
git checkout development
git mv MySubmodule OurSubmodule
git commit -m "Move MySubmodule to OurSubmodule."
git checkout master
rm -rf OurSubmodule
git submodule update --init
echo "barbar" > bar.txt
git commit -am"Update bar.txt"
git checkout development
rm -rf MySubmodule
git submodule update --init
git merge master
git add OurSubmodule
git commit -am"Resolve conflict"


-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to