Skip to content

Commit a4c1225

Browse files
committed
git-filter-repo.txt: briefly explain steps for pushing to original url
Signed-off-by: Elijah Newren <[email protected]>
1 parent b8ebda9 commit a4c1225

File tree

1 file changed

+26
-1
lines changed

1 file changed

+26
-1
lines changed

Documentation/git-filter-repo.txt

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -486,7 +486,32 @@ history rewrite are roughly as follows:
486486
namespaces (e.g. refs/changes/, refs/pull/,
487487
refs/merge-requests/) that they have locked down.
488488

489-
5. (Optional) Some additional considerations
489+
5. If you still want to push your rewritten history back to the
490+
original url despite my warnings above, you'll have to manage it
491+
very carefully:
492+
493+
* git-filter-repo deletes the "origin" remote to help avoid people
494+
accidentally repushing to the same repository, so you'll need to
495+
remind git what origin's url was. You'll have to look up the
496+
command for that.
497+
498+
* You'll need to carefully synchronize with *everyone* who has
499+
cloned the repository, and will also need to carefully
500+
synchronize with *everything* (e.g. CI systems) that has cloned
501+
it. Every single clone will either need to be thrown away and
502+
re-cloned, or need to take all the steps outlined in item 4 as
503+
well as follow the necessary steps from "RECOVERING FROM UPSTREAM
504+
REBASE" section of linkgit:git-rebase[1]. If you miss fixing any
505+
clones, you'll risk mixing old and new history and end up with an
506+
even worse mess to clean up.
507+
508+
* Finally, you'll need to consult any documentation from your
509+
hosting provider about how to remove any server-side references
510+
to the old commits (example:
511+
https://docs.gitlab.com/ee/user/project/repository/reducing_the_repo_size_using_git.html[GitLab's
512+
docs on reducing repository size]).
513+
514+
6. (Optional) Some additional considerations
490515

491516
* filter-repo by default creates replace refs (see
492517
linkgit:git-replace[1]) for each rewritten commit ID, allowing

0 commit comments

Comments
 (0)