?上傳大文件用到了git lfs,需要先安裝lfs
1、打開終端,輸入以下命令,按回車鍵。
brew install git-lfs
2、錯誤提示:
zsh: command not found: brew
需要安裝brew
3、安裝brew
1)輸入以下命令并按回車鍵
/bin/zsh -c "$(curl -fsSL https://gitee.com/cunkai/HomebrewCN/raw/master/Homebrew.sh)"
按照提示,選擇? 1 (中科大下載源)按回車鍵,后面根據提示繼續(xù)選擇1,按回車鍵,有時會讓你輸入密碼,按照提示照做就可以了。
2)安裝成功提示
安裝成功 但還需要重啟終端 或者 運行source /Users/lms/.zprofile? 否則可能無法使用
3)按照提示輸入以下命令并按回車鍵
source /Users/lms/.zprofile
4、執(zhí)行第一步,輸入以下命令并按回車鍵
brew install git-lfs
5、cd到你要push的目錄,找到大文件路徑地址,例如地址是 /Users/xxx/Desktop/Test/Test.a,那么輸入以下命令,按回車鍵
git add?/Users/xxx/Desktop/Test/Test.a
然后執(zhí)行commit命令
git commit -m "上傳大文件Test.a"
然后執(zhí)行push命令
git push
6、感謝
參考文檔:(安裝brew)https://blog.csdn.net/wang391752/article/details/121445700
? ? ? ? ? ? ? ? ? (使用git lfs)https://blog.csdn.net/weixin_42769131/article/details/124222987