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

RE: git-whatchanged -p anomoly?

From
Linus Torvalds <torvalds@osdl.org>
Date
Aug 18, 2005, 23:04 UTC
Message-ID
<Pine.LNX.4.58.0508181555370.3412@g5.osdl.org>
In-Reply-To
<B8E391BBE9FE384DAA4C5C003888BE6F042C819D@scsmsx401.amr.corp.intel.com>
On Thu, 18 Aug 2005, Luck, Tony wrote:
> 
> Yes I had a failed merge ... I thought that I had cleaned up from it, but
> clearly I hadn't.  Bother.

The simplest way of cleaning up after a failed merge is just a simple "git reset", which will also tell you if you need to perhaps clean up afterwards (equally easily done with "git checkout -f" if you just want to blow all the changes away.

Show 7 quoted lines
> I guess I have a bit of tree maintenance to do ... But I think that it
> should be easy ... I can just step "test" back to before I merged in
> the Alex patch.  Redo the Alex patch properly.  Then re-merge all the
> branches that happened after this.  Followed by crossing my fingers and
> running "git prune".
> 
> Maybe I'll try all that in a *copy" of my GIT tree first!
Yup. Think of it as a good exercise in git ;)

Btw, it's a shame that git has all these "git rebase" etc helper scripts, which rebase whole series of patches, but the simple "git re-do" which basically ends up being a

	git-diff-tree -p $old | git-apply --index &&
		git commit --reedit=$old
doesn't have a nice helper script.
Anyway, the easiest approach may be to just do
	git branch new-test-branch <good-point>
	git format-patch -o patchdir --mbox <good-point>
	git checkout new-test-branch
	.. edit the individual patches in patchdir/* to taste ..
	cat git-applymbox patchdir/* | git-applymbox
or similar. 
		Linus
Previous: Luck, TonyNext: Johannes Schindelin
Message 2 of 3 in “RE: git-whatchanged -p anomoly?”
  1. Luck, TonyAug 18, 2005
  2. Linus TorvaldsAug 18, 2005
  3. Johannes SchindelinAug 18, 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.