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

[ITCH] pull.default

From
Ramkumar Ramachandra <artagnon@gmail.com>
Date
Mar 18, 2013, 18:39 UTC
Message-ID
<CALkWK0nT9hE_kRt3DLXfP45OwCSLurMOzuTqepxhkWjagbFDUQ@mail.gmail.com>
Hi,
I usually use `git fetch`, inspect state, and then merge/ rebase
accordingly.  Unfortunately, this is very sub-optimal as I can
automate this 80% of the time.  I want to be able to decide what to do
on a repository-specific basis, and hence propose a pull.default which
can be set to the following:
1. fetch.  Just fetch.  (I will set this as my default in ~/.gitconfig)
2. fast-forward.  Fetch.  If the FETCH_HEAD is directly ahead of HEAD,
`stash`, merge, and stash apply.  Otherwise, do nothing.
3. rebase.  Fetch.  stash, rebase, stash apply. `git pull n` will do
rebase --onto master HEAD~n instead of rebase.
4. reset.  Fetch, stash, reset --hard FETCH_HEAD, stash apply.
Ofcourse, it should print a message saying what it did at the end.
What do you think?
Ram
Next: Junio C Hamano
Message 1 of 4 in “[ITCH] pull.default”
  1. Ramkumar RamachandraMar 18, 2013
  2. Junio C HamanoMar 18, 2013
  3. Ramkumar RamachandraMar 18, 2013
  4. Ramkumar RamachandraApr 13, 2013

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.