Skip to main content

push --force undoes the rewrite

Known bug, #38. This page shows what git-splice does today, bug included. See all known bugs.

In the same state, after a local change made before a merge or pull recorded the rewritten commit, git splice push --force makes the monorepo's side win. Its rebuild starts from the old synced commit, so the upstream gets back the history the rewrite removed. Don't use it when the rewrite removed something, like a secret; keep the upstream's version instead.

Output​

setup.bash builds this state:

$ build_scenario scenario_upstream_rewritten_equal_tree
$ echo "local change" >>vendor/a/file.txt &&
> git commit -q -a -m "local change" &&
> git splice push --force vendor/a
ok vendor/a: pushed 2543d4c to main
$ git -C "$UPSTREAM" log --format=%s main
local change
r: release
k: seed