What is the best way to fix divergent branches during push

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

 



Hi all,

Our team recently moved from SVN to git and occasionally we get our workspace in a snarl.  I could use some advice on the best way to resolve our issue.

In general, this is what happens:

1. git pull
2. bunch of edits which could last hours to days
3. git add
4. git commit
4a. sometimes there is a delay here before the next step because the user forgets a push is needed; but that is not always the case and the end results are the same
5. git push

At this point we have divergent branches.  Not surprising.  However, some users say no matter if the try a pull with ff-only, merge, or rebase that they get errors from git (sorry, I don't have the exact error text--but I hear 'git pull' continues to complain about divergent branches).

What is the recommended method to correct the divergent branches issue so that the 'git push' can proceed successfully?

Are the steps outlined above incorrect?  Should we insert the following steps:

2.a  git stash
2.b  git fetch
2.c  git pull
2.d  git stash pop

I think the added steps may minimize the probability of divergent branches, but it is certainly not ensuring divergent branches will not occur.

Any advice in this regard would be greatly appreciated.

Best regards,

-- 
Mun






[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]

  Powered by Linux