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

Tagging a branch as "not fitted for branching" ?

From
Jean-Noël Avila <avila.jn@gmail.com>
Date
Apr 28, 2014, 12:09 UTC
Message-ID
<535E4507.2070805@gmail.com>

Most manuals on git state that it is bad practice to push -f a branch after have meddled with its history, because this would risk to upset the repositories of the coworkers. On the other hand, some workflows use branches to propose modifications, and need some rewritting of the history after some review steps. In this case, the branch should only be seen as a mere pile of patches. Having this two-sided discourse is often misunderstood by casual git users.

The proposed solution would be to be able to flag the branches with a special tag "not fitted for branching" that a collaborator could use when pushing it. This tag would be passed on to any pulled remote. When another collaborator would then issue a "git checkout -b", the command would fail with a warning message, unless forced with '-f'.

Is this feature already present? If not, would it be of any interest?
Best regards,
Jean-Noël AVILA
Next: Junio C Hamano
Message 1 of 4 in “Tagging a branch as "not fitted for branching" ?”
  1. Jean-Noël AvilaApr 28, 2014
  2. Junio C HamanoApr 28, 2014
  3. Jean-Noël AvilaApr 29, 2014
  4. Junio C HamanoApr 29, 2014

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.