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