Skip to content

Commit

Permalink
Include + in the refspec in sample commands for split push (2 GB limi…
Browse files Browse the repository at this point in the history
…t) (github#34564)

Co-authored-by: Alex Nguyen <[email protected]>
  • Loading branch information
starrify and nguyenalex836 authored Sep 18, 2024
1 parent 667abc4 commit ac60b5f
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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.

```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.
Expand All @@ -52,7 +52,7 @@ Once you're familiar with the procedure, you can automate steps 2 to 4 to simpli

```shell
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
Expand Down

0 comments on commit ac60b5f

Please sign in to comment.