Commit a2761925 authored by Amy Qualls's avatar Amy Qualls

Merge branch 'product-2645-workaround-to-import-too-large-repo' into 'master'

Docs: Clarify usage of temporary branch

See merge request gitlab-org/gitlab!70395
parents d80978cd 76f6f92b
...@@ -240,9 +240,11 @@ reduce the repository size for another import attempt. ...@@ -240,9 +240,11 @@ reduce the repository size for another import attempt.
# Prevent interference with recreating an importable file later # Prevent interference with recreating an importable file later
mv project.bundle ../"$EXPORT"-original.bundle mv project.bundle ../"$EXPORT"-original.bundle
mv ../"$EXPORT".tar.gz ../"$EXPORT"-original.tar.gz mv ../"$EXPORT".tar.gz ../"$EXPORT"-original.tar.gz
git switch --create smaller-tmp-main
``` ```
1. To reduce the repository size, 1. To reduce the repository size, work on this `smaller-tmp-main` branch:
[identify and remove large files](../repository/reducing_the_repo_size_using_git.md) [identify and remove large files](../repository/reducing_the_repo_size_using_git.md)
or [interactively rebase and fixup](../../../topics/git/git_rebase.md#interactive-rebase) or [interactively rebase and fixup](../../../topics/git/git_rebase.md#interactive-rebase)
to reduce the number of commits. to reduce the number of commits.
...@@ -254,7 +256,7 @@ reduce the repository size for another import attempt. ...@@ -254,7 +256,7 @@ reduce the repository size for another import attempt.
git gc --prune=now --aggressive git gc --prune=now --aggressive
# Prepare recreating an importable file # Prepare recreating an importable file
git bundle create ../project.bundle <default-branch-name> git bundle create ../project.bundle smaller-tmp-main
cd .. cd ..
mv project/ ../"$EXPORT"-project mv project/ ../"$EXPORT"-project
cd .. cd ..
...@@ -270,5 +272,5 @@ reduce the repository size for another import attempt. ...@@ -270,5 +272,5 @@ reduce the repository size for another import attempt.
1. Update the imported repository's 1. Update the imported repository's
[branch protection rules](../protected_branches.md) and [branch protection rules](../protected_branches.md) and
its [default branch](../repository/branches/default.md), and its [default branch](../repository/branches/default.md), and
delete the temporary, `smaller-` branch, and delete the temporary, `smaller-tmp-main` branch, and
the local, temporary data. the local, temporary data.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment