1. 程式人生 > >git一次push異常

git一次push異常

$ git push -u origin master -f
Counting objects: 1265, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (1166/1166), done.
Writing objects: 100% (1265/1265), 53.01 MiB | 381.00 KiB/s, done.
Total 1265 (delta 277), reused 0 (delta 0)
remote: Resolving deltas: 100% (277/277), done.
remote: warning: Large files detected.
remote: error: File "Doc/\346\265\213\350\257\225" is 164.08 MB; this exceeds file size limit of 100.0 MB
remote: error: hook declined to update refs/heads/master
To https://git.oschina.net/androidios_monarch/ftagriculture.git
 ! [remote rejected] master -> master (hook declined)

error: failed to push some refs to 'https://git.oschina.net/androidios_monarch/ftagriculture.git'

剛開始沒注意remote: error: File "Doc/\346\265\213\350\257\225" is 164.08 MB; this exceeds file size limit of 100.0 MB這一句話,osc git單個最大檔案不能超過100mb,

對於多次本地提交的,回滾到上次提價,把大於100mb的檔案刪除或者壓縮,再重新提交就可以了

檢視提交歷史

 git log 

回滾

git reset commit_id