This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: gcc-cvs mails for personal/vendor branches for merge commits

Le 18/01/2020 à 18:49, Segher Boessenkool a écrit :
On Wed, Jan 15, 2020 at 04:37:49PM +0000, Iain Sandoe wrote:
I’m guessing that public development branches will probably gravitate to the
no non-FF mode, if they are to be used by people other than the primary author

.. although that does somewhat limit things; rebasing WIP onto trunk and
reorganising / squashing is useful as well.

If a branch does rebase all people who commit to it need to make sure
not to overwrite others' work.  Your pushes are always non-fast-forward,
so you do not notice you did not incorporate someone else's new work if
you do not take care.

There is the git push --force-with-lease option to avoid that. Its goal is to force a non-fast-forward push, but only if the remote position (HEAD) is actually where you expect it to, that is no work you don't know about has been pushed in the mean time.

I strongly recommend to use --force-with-lease on non-user branches. User branches you usually control totally and are the only one to push to, so that's less an issue.

One easy way to avoid this is to just have only one person pushing to a
certain branch.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]