Automation Issues

Somehow I messed up our main branch as well as a function branch with which I messed up the main branch. Now I'm trying to fix it, but I'm having problems. For what it's worth, I defined a commit that I need to "roll back" in both the main and the function branches, so I believe that the original problem has been removed.

PROBLEM: When I merge a function branch into master, it seems that auto-merge removes some code into function branches and does not merge it into master. This prevents me from resolving this as a merge conflict ... it just does not transfer these code fragments to master.

A HACK: I found that if I go into one of the affected scripts (account / views.py) in the function branches and delete the space or something else, it will force me to resolve it as a conflict, and I could then tell Git, to save the code I need so that it is saved. Of course, I could do this, I suppose, for all the scenarios affected, but I would prefer not to “hack” if there is a more elegant way to handle this with Git.

I ran the command git diff feature-branchand copied the results into a text document so that I could select it to determine that everything requires the above “hacking processing”, but it is BIG.

I'm not sure if there is any screenshot that would help, so no one is on. Please let me know about any useful information, and I will give it that right.

Any help would be greatly appreciated.

UPDATE # 1

Shows terminal commands during the merge: ** sits on the "leading" branch ... this is what appears after the "hack" on apps / account / views.py

kedmiston:ahnew kedmiston$ git merge ftr_refer
Auto-merging apps/ajax/views.py
CONFLICT (content): Merge conflict in apps/ajax/views.py
Auto-merging apps/account/views.py
CONFLICT (content): Merge conflict in apps/account/views.py
CONFLICT (modify/delete): apps/account/templates/account/refer-success.html deleted in HEAD and modified in ftr_refer. Version ftr_refer of apps/account/templates/account/refer-success.html left in tree.
CONFLICT (modify/delete): apps/account/templates/account/refer-a-friend.html deleted in HEAD and modified in ftr_refer. Version ftr_refer of apps/account/templates/account/refer-a-friend.html left in tree.
Auto-merging ahnew/urls.py
CONFLICT (content): Merge conflict in ahnew/urls.py
Automatic merge failed; fix conflicts and then commit the result.
kedmiston:ahnew kedmiston$ git mergetool

UPDATE # 2

The last thought / suspicion ... is that what gets lost in merging with the property branch (ftr_refer) for master comes from the commits in the ftr_refer history that were made before the host commit date that Im trying to merge into. However, I wonder if I should roll back from the master to the date at the end of September, merge ftr_refer into it, will this allow ftr_refer changes to be managed correctly or not? And then, if so, how could I reapply commits / merges to handle this, to bring it back?

git log ftr_refer (1): ftr_refer most recent (4): master most recentmaster recent-1master recent-2master recent-3

+4
1

, , , .

, , . 3 , BASE, REMOTE, LOCAL. git checkout master, git merge ftr_refer,

BASE=$(git merge-base master ftr_refer)
LOCAL=master
REMOTE=ftr_refer

, ,

git log ^${BASE} master # changes on master only 
git log ^${BASE} ftr_refer # changes on ftr_refer only 

Git

git log ftr_refer..master # changes on master only 
git log master..ftr_refer # changes on feature refer only

, views.py BASE 1000 . - 500 . ftr_refer - 900-1000. , Git . , views.py, 500 , 400-500 . Git , - . , 500 - , ( ).

, - . . , . , , ftr_refer, .

, , .

git log ftr_refer..master -- account/views.py

.

git log --name-only ftr_refer..master

, . , . , . , . , ftr_refer, . .

, .

git checkout ftr_refer
git merge master 

git checkout ftr_refer
git rev-list --reverse ftr_refer..master # this will list out a bunch of shas

SHA . SHA, ,

git merge SHA 

SHA, ,

git merge -s=ours SHA

SHA .

, SHA. SHA, foo, , . .

" " - , .

+8

All Articles