What I did: I detached the head of my working branch MOODLE_27_STABLE. I then created a new branch called patterns new, checking out the detached head state with
checkout -b patterns_new
I then changed the file db/upgrade.php on 20th of october: Link to this commit, I call it A
Then, 2 commits later suddenly those changes disappeared in upgrade.php. But the commits do not mention, that db/upgrade.php was even modified.
After the first commit that followed, db/upgrade.php is still unchanged Link to that commit, B
Then after the next commit suddenly the db/upgrade.php file is overwritten with an older commit. [Link to that commit, C][3]
You can see in commit C, that nothing was changed viewing the diff. But in browsing the repository at this point in the history shows, that the commit A was overwritten with an older commit. (Near line 793 the additions made in commit A are not there anymore) [Link to the db/upgrade.php at that point in the history][4]
What I did to completely replace MOODLE_27_STABLE with the patterns_new branch (based on a detached head from MOODLE_27_STABLE was later that:
git checkout patterns_new
git merge -s ours MOODLE_27_STABLE
git checkout MOODLE_27_STABLE
git merge patterns_new
(based on the following tutorial [replace branch entirely by another branch][5])
I do now fear, that that might not be the only commit, that has been overwritten. Why can that happen and how can I assure, that all of the commits in pattern_new are "restored"? Should I cherry-pick them all again?
(I had to remove the links 3 to 5, because I am not allowed to post more due to a stackoverflow rule "You need at least 10 reputation to post more than 2 links)