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

Use "git pull --ff-only" by default?

From
Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Date
May 21, 2010, 12:59 UTC
Message-ID
<A612847CFE53224C91B23E3A5B48BAC74483234E90@xmail3.se.axis.com>

Is there some way to make "git pull --ff-only" be the default? I could not find anything about this in "git config --help" and also the lack of a --no-ff-only option for git pull (it exists for git merge) indicates that there is no such support.

I did considered the branch.<name>.mergeoptions configuration option, but it does not seem appropriate as it only applies to a specific branch, whereas I want it to apply to all branches by default.

Yes, I know I could do "git config alias.pl 'pull --ff-only'", but since my intensions are for this to be the default for all developers in our organization (most of whom have no git knowledge at all yet) to avoid unnecessary branches caused by the developers hacking directly on master rather than a topic branch, I would very much prefer a configuration option rather than an alias (as I am unlikely to get the developers to remember to do "git pl" instead of "git pull").

My idea was to add something like merge.options and pull.options as configuration options (I want to be able to specify the options separately for pull and merge). However, I wanted throw this out here first before starting to hack away at the code, in case I missed something obvious, or if others find this to be an incredibly stupid idea...

//Peter
Next: Ævar Arnfjörð Bjarmason
Message 1 of 13 in “Use "git pull --ff-only" by default?”
  1. Peter KjellerstedtMay 21, 2010
  2. Ævar Arnfjörð BjarmasonMay 21, 2010
  3. Michael J GruberMay 21, 2010
  4. Peter KjellerstedtMay 21, 2010
  5. Michael J GruberMay 21, 2010
  6. Jay SoffianMay 21, 2010
  7. Michael J GruberMay 22, 2010
  8. Peter KjellerstedtMay 24, 2010
  9. Dmitry PotapovMay 24, 2010
  10. Peter KjellerstedtMay 25, 2010
  11. Dmitry PotapovMay 27, 2010
  12. Peter KreftingMay 21, 2010
  13. MonsignorApr 29, 2016

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.