赞
踩
昨天写了个特征脸的小Demo,短小精悍,于是想放到github上。
但网页上传总会提示 "Something went really wrong, and we can’t process that file."
于是自学了如何使用git bash,这里记录以备不时之需。
附:git bash Windows 下载地址:Git for Windows
安装教程随便网上找一篇就好了,不多说。
这个是自学git bush 使用本地仓库及远程仓库的全过程,强烈推荐观看!!很有用!!
How to upload files to github from Git Bash on Windows from scratch_哔哩哔哩_bilibili
这里作者使用了以下几个命令
git init # 在要上传文件的文件夹使用,建立本地仓库
- git remote add origin <gitlink> # 这里放远程仓库的链接
-
- git remote -v #查看是否连接成功
git add . # 使用.表示将此文件夹下的所有文件上传到缓冲区,可用想单独上传的文件名代替
git commit -m "YOUR COMMENTS" # 双引号中写你想要写的日志 可以使用 "First commit"
5. 将缓冲区中的文件送到远程仓库中
git push origin master # 直接push即可
之后会弹窗让输入github的Username和password
password在2021年8月后不支持使用了,这里的password要使用token代替
2.左侧的Developer settings
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。