git/list[1] front-page[2] threads[3] people[4] search[5] about
 

git merge deletes my changes

From
EEEduard 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 requested

I 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

Next: Jeff King
Message 1 of 3 in “git merge deletes my changes”
  1. Eduard EgorovOct 10, 2016
  2. Jeff KingOct 10, 2016
  3. Eduard EgorovOct 11, 2016

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.