git merge deletes my changes
- From
- Eduard Egorov <eduard.egorov@icl-services.com>
- Date
- Oct 10, 2016, 09:39 UTC
- Message-ID
- <AM4PR03MB1636D18D727968F332F16021DBDB0@AM4PR03MB1636.eurprd03.prod.outlook.com>
Hello Git experts,
A week ago, I've reset a state of 'ceph-ansible' folder in %current% branch with code from corresponding branch (that tracks an upstream from github):
# git read-tree --prefix=ceph-ansible/ -u ceph_ansible
Then I've committed several changes, including:
1. Renamed file and commited: # git mv site.yml.sample site.yml
2. Made some changes and committed
3. Pulled updates from original branch by: # git merge -s subtree --squash ceph_ansible
It said:
Auto-merging ceph-ansible/site.yml.sample
blablabla
Squash commit -- not updating HEAD
Automatic merge went well; stopped before committing as requestedI can see that "my" ceph-ansible/site.yml is deleted (as well as few new files added by me), ceph-ansible/site.yml.sample is restored and doesn't contain my changes (it's just restored to the state before my changes). `git log ceph_ansible site.yml.sample` shows the latest change on ceph_ansible branch done from 26th of August, 2016, my changes in %current% branch was this October, so it shouldn't be any conflict either (even if it was). I believe there is some obvious explanation for this behavior. Could you help me please? What information can I provide in order to troubleshoot this issue?
A post on SO: http://stackoverflow.com/questions/39954265/git-merge-deletes-my-changes
With best regards Eduard Egorov