Repository navigation
v1.7.0
A fold deep under later changes now stops once per distinct content instead of at every later commit, uncommitted edits can follow a rewrite onto its new content, and a scoped fold of a non-ASCII path no longer commits a stray file.
A fold into a commit far below later changes to the same lines used to stop at each later commit that touched them, every stop a state written by hand. --amend-into=<sha> --snapshot merges the fold into every commit from the target up instead, through git merge-tree against the tip as base, so a file moved since takes the fold under its old name and each commit keeps its author and message. A conflict stops once per distinct content of the conflicted file, in a worktree laid out as any merge's: resolve it, git add, git edit --continue, and that resolution serves every commit carrying the same content, while rerere pre-fills a hunk resolved at an earlier stop. On a real fold 415 commits deep it stopped 7 times and rebuilt every commit exactly as a hand-built history had. Only conflicts over content resolve this way, and it needs git 2.40 or later.
A landing that changes files carrying uncommitted edits now names those whose edits sit on the old content – committed as they stand, they would take the rewrite back – and a renamed file whose edits stayed at its old path, where it used to offer a restore of the new path that stranded them. The git edit --carry=<old tip> it prints merges those edits onto the new content, writing only clean merges that keep the edits whole and naming the rest. It never runs on its own, since a rewrite that took content out of history hands it back as uncommitted work, which the merge would take out again.
A scoped fold – --amend-into=<sha> -- <paths> – of a path with non-ASCII characters read git's quoting of that path back as a name, committing a file called "\303\234ber.txt" beside the real one and leaving the real one unfolded. Paths now pass through as their own bytes.
With GIT_EDIT_ACTOR set, --undo refuses a run made under another label, or none, unless --allow-other-actor says it is meant: the journal is the repository's, so its last run can be a parallel session's on any branch. A landing that rewrote pushed history prints the push that publishes it, its --force-with-lease pinned to the upstream the rewrite replaced, since a background fetch would otherwise move the remote-tracking ref under a bare lease. And a -C worktree whose folder vanished is reclaimed alone, where a repository-wide git worktree prune also deleted the records of every other worktree whose folder was gone.
brew install thomasbachem/tap/git-edit
Or brew upgrade git-edit where it is already installed, or pull the repo if its folder is on your PATH.