Re: How to fix “Your branch and 'origin/master' have diverged” after editing a commit that came before a pull?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Clarification:

Simply pulling again does not fix the problem; it just reapplies the
commits D, E on top of what I already have (despite the D, E already
being there in the history), which also has the side-effect of
producing superfluous conflicts.

On Fri, Nov 19, 2010 at 4:36 PM, Yang Zhang <yanghatespam@xxxxxxxxx> wrote:
> In the following scenario:
>
> 1. Make commits A, B, C
> 2. Pull, getting commits D, E
> 3. Make more commits F, G, H, ...
> 4. Realize that you need to tweak B
> 5. Tweak B using git rebase -i and git commit --amend
>
> Now git status says:
>
>  Your branch and 'origin/master' have diverged.
>
> How should I fix this? Thanks.
>



-- 
Yang Zhang
http://yz.mit.edu/
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]