error: failed to push some refs to ‘https://gitee.com/XXXX/ui-demo.git’

Solution 1:

1. Enter: git pull — rebase origin master in Git bash; It means to cancel the commit records first and save them as patches temporarily (these patches are placed in the “. Git/rebase” directory), then synchronize the remote library to the local, and finally merge the patches into the local library.

2. Push again and still fail

3. It is found that gitee has the limitation that files larger than 100m cannot be uploaded.

4. Re execute git pull — rebase origin master command

5. Only push files less than 100m, successful!

  Summary:

Before pushing, you need to ensure that the remote and local versions are consistent, and the file cannot exceed the size limit of gitee.

Similar Posts: