ctubbsii commented on PR #3510:
URL: https://github.com/apache/accumulo/pull/3510#issuecomment-1601669775

   > I'm used to using -X as a force of habit for merging forward things that 
just have version conflicts as it is handy for that.
   
   Oh yeah... great example. I should have used that after the 2.1.1 release. 
Instead, I just manually resolved the conflicts (using vim, one file at a time, 
from an SSH terminal on my phone, in the waiting room while my vehicle was 
getting an oil change and tire rotation). That would have **really** saved me 
the effort!!! :face_exhaling:
   
   > One thing I thought of is if you use `git merge -s ours` does it only skip 
conflicting commits or will it not bring in any commits? Would it sill merge in 
commits from the source branch that merge cleanly?
   
   It brings in references to any number of HEADs being merged in, but does not 
change anything in the destination branch. So, if there were more than one 
commit in the history that you're merging in this way, you should merge that 
forward the regular way first. I always check that the parent is merged first, 
before merging anything with `-sours`.
   
   For example:
   
   ```bash
   $ git remote update upstream
   $ git checkout main && git merge upstream/main --ff-only # make sure working 
branch is up-to-date
   $ git merge upstream/2.1~1 # clean merge of 2.1's HEAD's parent commit with 
changes, adds one merge commit to main branch
   $ git merge upstream/2.1 -sours # include 2.1's HEAD without changes, adds 
second merge commit to main branch
   $ doSomeEditing # reimplement 2.1's HEAD in main branch
   $ git commit -a # adds a third commit to main branch for the reimplementation
   $ git push upstream main
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to