1
0
mirror of synced 2025-12-23 03:44:00 -05:00

Include + in the refspec in sample commands for split push (2 GB limit) (#34564)

Co-authored-by: Alex Nguyen <150945400+nguyenalex836@users.noreply.github.com>
This commit is contained in:
Peng-Yu Chen
2024-09-18 15:09:10 +01:00
committed by GitHub
parent 667abc48a5
commit ac60b5fea3

View File

@@ -34,7 +34,7 @@ You can avoid hitting the limit by breaking your push into smaller parts, each o
1. Push each of these commits one at a time to your {% data variables.product.prodname_dotcom %} hosted repository. 1. Push each of these commits one at a time to your {% data variables.product.prodname_dotcom %} hosted repository.
```shell ```shell
git push REMOTE-NAME <YOUR_COMMIT_SHA_NUMBER>:refs/heads/BRANCH-NAME git push REMOTE-NAME +<YOUR_COMMIT_SHA_NUMBER>:refs/heads/BRANCH-NAME
``` ```
If you see the message `remote: fatal: pack exceeds maximum allowed size`, reduce the step size in step 2 and try again. If you see the message `remote: fatal: pack exceeds maximum allowed size`, reduce the step size in step 2 and try again.
@@ -52,7 +52,7 @@ Once you're familiar with the procedure, you can automate steps 2 to 4 to simpli
```shell ```shell
step_commits=$(git log --oneline --reverse refs/heads/BRANCH-NAME | awk 'NR % 1000 == 0') step_commits=$(git log --oneline --reverse refs/heads/BRANCH-NAME | awk 'NR % 1000 == 0')
echo "$step_commits" | while read commit message; do git push REMOTE-NAME $commit:refs/heads/BRANCH-NAME; done echo "$step_commits" | while read commit message; do git push REMOTE-NAME +$commit:refs/heads/BRANCH-NAME; done
``` ```
## Starting from scratch ## Starting from scratch