git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: On using receive.denyNonFastForwards and advice.pushNonFastForward

From
Matthieu Moy <matthieu.moy@grenoble-inp.fr>
Date
Jul 9, 2012, 08:36 UTC
Message-ID
<vpqobnpz5y0.fsf@bauges.imag.fr>
In-Reply-To
<CAE1pOi1M-fdMJtZw9MNL2R6zWvpXvWVo4ros_NSCQtLmQb6TOQ@mail.gmail.com>
Hilco Wijbenga <hilco.wijbenga@gmail.com> writes:
> I was wondering how hard it would be to make "git push" more adamant
> about not pushing non-ff updates. So I wanted to see the effects of
> receive.denyNonFastForwards

This changes the behavior only if you use --force (or some magic refspec starting with +). If you never used --force or +refspecs, you never did a non-fast-forward push.

> and advice.pushNonFastForward.

Activated by default, so if you never did anything about it, it was already active.

> Apparently, linear history and FF-only updates are not the same thing?

No, they are not. non-FF means you're trying to push a commit which is not a direct descendant of the remote one, i.e. you're trying to override the remote history with yours. See 'NOTE ABOUT FAST-FORWARDS' in "man git-push".

-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/
Previous: Christopher Tiwald
Message 3 of 3 in “On using receive.denyNonFastForwards and advice.pushNonFastForward”
  1. Hilco WijbengaJul 8, 2012
  2. Christopher TiwaldJul 9, 2012
  3. Matthieu MoyJul 9, 2012

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.