So, I have a submodule that I'm trying to convert into a subtree. Disclaimer: I'm new to using subtrees.
During my testing, I made a change in a file (changed 'foo' to 'bar') and pushed it via the subtree. Seemed to work.
Then I went to the remote and undid that change (changed 'bar' to 'foo') with a new commit. So far so good.
Then I went back to my local repo, pulled the subtree, and... nothing.
My best guess is that it's merging the (older, foo->bar) change on the local to the (newer, bar->foo) change on the remote, and for some reason deciding that the older one should override the newer one, which leaves the code with 'bar'.
Why is this happening, and can/should/how do I get it to stop?
EDIT: Adding the actual steps being done.
1) Add SubTree from SourceTree:
git -c diff.mnemonicprefix=false -c core.quotepath=false --no-optional-locks subtree add -P MySubtree --squash {cloneUrl} master
git fetch {cloneUrl} master
From {cloneUrl}
* branch master -> FETCH_HEAD
Added dir 'MySubtree'
2) Make change to code
3) $ git commit -am "SubtreeTest - add change"
4) Push to SubTree using SourceTree:
git -c diff.mnemonicprefix=false -c core.quotepath=false --no-optional-locks subtree push -P MySubtree --squash {cloneUrl} master
git push using: {cloneUrl} master
5) Directly on BitBucket, make a new commit that undoes the last one.
6) Pull from SubTree in SourceTree:
git -c diff.mnemonicprefix=false -c core.quotepath=false --no-optional-locks subtree pull -P MySubtree --squash {cloneUrl} master
warning: no common commits
From {cloneUrl}
* branch master -> FETCH_HEAD
Auto-merging SubTree/BSC/Constants.cs
Merge made by the 'recursive' strategy.
Completed successfully.