同步笔记到github
- 在github上建立私有仓库md
- 创建本地仓库,用git-cmd.exe打开
-
默认上传所有若要去除一些参见https://blog.youkuaiyun.com/weixin_44539199/article/details/106608302
-
关联仓库
git remote add origin git@github.com:[huiguo07]/[md].git
git remote -v
-
本地文件同步到远程
-
在目录的命令行工具中依此执行
-
git add .
git commit -m “some description”
git push -u origin master- 
-
出现错误
生成ssh keyhttps://www.jianshu.com/p/259773014e03
ssh-keygen -t rsa -C “your_email@example.com”
将md密钥添加到github上
以下亲测有用上面的没有尝试成功
- 打开git.bash
git config --global user.eamil "1365769243@qq.com"
git config --global user.name "guohui"
[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-GOdL6eZn-1619266818972)(C:%5CUsers%5CAdministrator%5CAppData%5CRoaming%5CTypora%5Ctypora-user-images%5Cimage-20210314180021240.png)]
-
切换到上传的目录
-
在上传的目录下初始化
-
-
git add .
git commit -m "some description"
git remote add origin https://github.com/huiguo07/md.git //建立远程连接
git push -u origin master
git config --system http.sslverify false //关闭证书校验。
git config --global --unset http.proxy //不使用代理
git push -u origin master
覆盖掉之前的,重新上传
cd D:/md
git add .
git commit -m "some description"
git remote add origin https://github.com/huiguo07/md.git //建立远程连接
git remote set-url origin https://github.com/huiguo07/md.git //清除链接
git push -u origin master