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

cookbook question

From
Kyle Rose <krose@krose.org>
Date
Feb 28, 2008, 19:00 UTC
Message-ID
<47C704BB.2010707@krose.org>

In maintaining a postfix config that differs maybe 10% between two different machines, I have a "common" branch that has ???? in the fields that differ. I realized after speaking with one of the git developers a few weeks ago that I really should be using git-rebase to fix up the machine-specific branches when I make a change to the common branch. Unfortunately, the merge history was screwed up enough such that doing

git rebase -s ours origin/common

replaced one machine-specific config with the other, which is not what I wanted.

In order to reset things to a state in which git-rebase would be useful, I did the following:

git diff origin/common >/tmp/diff git reset --hard origin/common patch -p1 </tmp/diff git commit -a -m 'reintroduce changes'

which works fine, but is obviously not the right way to do this. What *is* the right way to accomplish this? Essentially, I'm trying to reset the rebase point such that git won't rewind earlier when trying to do subsequent rebases.

Kyle
Next: Charles Bailey
Message 1 of 4 in “cookbook question”
  1. Kyle RoseFeb 28, 2008
  2. Charles BaileyFeb 28, 2008
  3. Kyle RoseFeb 28, 2008
  4. Charles BaileyFeb 28, 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.