github上传代码

先在github上创建一个仓库,不勾选readme

初次上传

clash
换个窗口
echo "# demo" >> README.md
git init
git add README.md
git commit -m "first commit"
git branch -M main
git remote add origin https://github.com/ddxxz/demo.git
proxychains4 git push -u origin main

第二次上传

git add .
git commit -m "second commit"
git branch -M main
#git remote add origin https://github.com/ddxxz/demo.git
proxychains4 git push -u origin main
#图片路径直接复制上传图片的网页地址

上传大文件至github

sudo apt-get install git-lfs
git lfs install
git lfs track "*.rar" #指定要跟踪的大文件类型
git add .gitattributes # 添加 .gitattributes 文件
git add <large_file> # 添加你要上传的大文件
git commit -m "Add large file with LFS"
proxychains4 git push origin main
git lfs ls-files

git lfs push --all origin main #如果上面上传不上去就用这个强制上传
------ 本文结束 🎉🎉 谢谢观看 ------
0%