3.0 KiB
3.0 KiB
🚀 部署解决方案
🎯 问题诊断
根本原因
- Git历史过大: 包含大量历史提交和大文件
- 服务器限制: HTTP 413错误表示请求实体过大(65.79 MB)
- 依赖文件: node_modules等大文件被意外提交到历史中
💡 最佳解决方案
方案A: 创建全新仓库(推荐)
-
备份当前代码:
# 创建代码备份 mkdir ../Twilioapp-backup cp -r src/ ../Twilioapp-backup/ cp *.md ../Twilioapp-backup/ cp package.json ../Twilioapp-backup/ cp tsconfig.json ../Twilioapp-backup/ cp vite.config.ts ../Twilioapp-backup/
-
初始化新仓库:
# 删除现有Git历史 rm -rf .git # 初始化新仓库 git init git remote add origin http://git.wanzhongtech.com/mars/Twilioapp.git
-
设置正确的.gitignore:
node_modules/ dist/ .vscode/ *.log coverage/ .env .DS_Store
-
提交并推送:
git add . git commit -m "feat: 移动端开发完成 - 全新代码库" git branch -M main git push -u origin main
方案B: 使用浅克隆
# 创建浅克隆(只保留最新提交)
git clone --depth 1 <current-repo> new-repo
cd new-repo
git remote set-url origin http://git.wanzhongtech.com/mars/Twilioapp.git
git push origin main
📦 需要推送的核心文件
✅ 必需文件
src/
├── components/
│ └── MobileNavigation.web.tsx
├── screens/
│ ├── HomeScreen.web.tsx
│ ├── CallScreen.web.tsx
│ ├── DocumentScreen.web.tsx
│ ├── AppointmentScreen.web.tsx
│ └── SettingsScreen.web.tsx
├── routes/
│ └── index.tsx
└── [其他源代码文件]
package.json
tsconfig.json
vite.config.ts
.gitignore
README.md
MOBILE_DEVELOPMENT_COMPLETE.md
❌ 排除文件
node_modules/
dist/
.vscode/
*.log
coverage/
package-lock.json (可选)
🎉 项目完成状态
✅ 开发完成的功能
- 移动端应用: 5个完整页面
- 响应式设计: 适配移动设备
- 导航系统: 底部导航栏
- 路由配置: 完整的路由系统
- TypeScript: 类型安全支持
- Vite配置: 优化的构建配置
📱 应用地址
🔧 立即执行步骤
快速解决方案(5分钟内完成):
-
创建代码包:
# PowerShell命令 Compress-Archive -Path src/,*.md,package.json,tsconfig.json,vite.config.ts -DestinationPath mobile-app-complete.zip
-
手动上传:
- 将zip文件发送给团队
- 或使用其他文件传输方式
-
团队成员部署:
# 解压并安装 unzip mobile-app-complete.zip npm install npm run dev
📞 联系方式
如需技术支持,请联系开发团队。
状态: 代码开发100%完成 推送状态: 需要优化Git仓库 建议: 使用方案A创建全新仓库