You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by GitBox <gi...@apache.org> on 2018/04/13 18:43:47 UTC

[GitHub] ccollins476ad commented on issue #699: Sensors/BMA2XX - New PR based on PR #697 changes

ccollins476ad commented on issue #699: Sensors/BMA2XX - New PR based on PR #697 changes
URL: https://github.com/apache/mynewt-core/pull/699#issuecomment-381226902
 
 
   @joshgrob, the short answer is: you probably just need to do a `git push -f fork master` (i.e., a force push).
   
   Here are some more details.  Since you have done a `git pull --rebase origin master`, then your local git history is incompatible with the remote history in your fork.  A normal (non-force) push can only append new commits on top of the remote history, it cannot interleave new commits.
   
   Say your local and remote repos both have histories that look like this (`A#` are commits in apache-mynewt-core;`J#` are commits specific to this PR).
   
   ```
   LOCAL       REMOTE
   J3          J3
   J2          J2
   J1          J1
   A4          A4
   A3          A3
   A2          A2
   A1          A1
   ```
   
   That is, your three commits are "on top" of the core repo.  Then you do a pull with rebase, which takes the latest from core and moves your commits on top of those:
   
   ```
   LOCAL       REMOTE
   J3          J3
   J2          J2
   J1          J1
   A6          A4
   A5          A3
   A4          A2
   A3          A1
   A2
   A1
   ```
   
   Git can't reconcile these two histories.  Specifically `J1` has a different parent in your local repo than in the remote repo.  When you do a force push, you replace the remote history with an exact copy of your local history:
   ```
   LOCAL       REMOTE
   J3          J3
   J2          J2
   J1          J1
   A6          A6
   A5          A5
   A4          A4
   A3          A3
   A2          A2
   A1          A1
   ```
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services