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

Re: Which freedesktop.org "design flaws" in git are still relevant?

From
Jay Soffian <jaysoffian@gmail.com>
Date
Feb 29, 2008, 22:40 UTC
Message-ID
<76718490802291440x60896c93i26d8d0c2cf5678b2@mail.gmail.com>
In-Reply-To
<alpine.LNX.1.00.0802291614230.19665@iabervon.org>
On Fri, Feb 29, 2008 at 4:58 PM, Daniel Barkalow <barkalow@iabervon.org> wrote:
> I wonder if it would be nice to have per-branch aliases, so that you
> could have "git update" do whatever is appropriate to update this
> particular branch, whether it be "git pull --no-commit" or "git reset
> --hard origin/next && git merge" or "git rebase".

Well, you effectively have this via branch.*.{merge,mergeoptions,rebase,remote}. e.g.:

To effect fetch + non-committing merge:
  branch.<name>.remote        = origin
  branch.<name>.merge         = refs/heads/<name>
  branch.<name>.mergeoptions  = --no-commit
To effect fetch + rebasing:
  branch.<name>.remote        = origin
  branch.<name>.merge         = refs/heads/<name>
  branch.<name>.rebase        = true
(Not sure if there is a way to get "rebase -m" though...)

To effect reset --hard origin/next, add another fetch line to your remote. e.g.:

  [remote "origin"]
    url = git://git.kernel.org/pub/scm/git/git.git
    fetch = +refs/heads/*:refs/remotes/origin/*
    fetch = refs/heads/pu:/refs/heads/pu-readonly
Now "git pull" does the right thing whichever branch I'm on.
j.
Previous: Daniel BarkalowNext: Jay Soffian
Message 7 of 9 in “Which freedesktop.org "design flaws" in git are still relevant?”
  1. Elijah NewrenFeb 29, 2008
  2. Nicolas PitreFeb 29, 2008
  3. Jakub NarebskiFeb 29, 2008
  4. Jakub NarebskiFeb 29, 2008
  5. Junio C HamanoFeb 29, 2008
  6. Daniel BarkalowFeb 29, 2008
  7. Jay SoffianFeb 29, 2008
  8. Jay SoffianFeb 29, 2008
  9. Daniel BarkalowFeb 29, 2008

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.