1 cd /path/to/your/file (已建好专用文件夹 这步不需要了)
2 git init
3 git remote add origin https://github.com/MrCookieeeee/FileTrans.git
作用: 关联本地仓库与远程 GitHub 仓库。
• origin 是远程仓库的默认名称(你可以自定义)。
• https://github.com/your-username/your-repo.git 是 GitHub 上的仓库地址。
执行后: origin 作为远程仓库被添加,你可以用 git push origin 推送代码。
4 git add your-file
5 git commit -m "Add file"
6 git push origin main
mac文件中转github到服务器
于 2025-03-15 14:24:04 首次发布