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

tracking a tree that doesn't progress linearly

From
Paul Mackerras <paulus@samba.org>
Date
Nov 11, 2005, 03:18 UTC
Message-ID
<17268.3463.252020.591687@cargo.ozlabs.ibm.com>

I want to be able to publish a git tree for others to follow but I also want to be retain the freedom to remove commits and/or rebase commits in the tree. For example, if someone sends me a patch and I put it in the tree, then they send me a revised version, I want to be able to roll back to just before I applied the older patch and start again from there.

What this means, AFAICS, is that the head of the published tree won't always be a descendent of all previous values of the head. If somebody is following the state of the tree by doing a git pull every so often, and I have rolled back the tree and applied some new patches, then the git pull will try to merge the old and new state, which is not what we want. What we want is something that just gets the local tree to the same state as the remote tree.

Is there a git command which does the equivalent of a git fetch, followed by setting the head and checking it out?

Or is this an incredibly stupid idea for some reason that hasn't occurred to me yet? :)

Thanks, Paul.

Next: Martin Langhoff
Message 1 of 4 in “tracking a tree that doesn't progress linearly”
  1. Paul MackerrasNov 11, 2005
  2. Martin LanghoffNov 11, 2005
  3. Catalin MarinasNov 11, 2005
  4. Petr BaudisNov 11, 2005

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.