How to fix “Your branch and 'origin/master' have diverged” after editing a commit that came before a pull?
- From
Yang Zhang <yanghatespam@gmail.com>
- Date
- Nov 20, 2010, 00:36 UTC
- Message-ID
- <AANLkTikr+uGrO2EB9WQk+CXeOm7jiYxdbhGzRRvgc9B9@mail.gmail.com>
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.