git使用记录

本文用于记录本人使用VSCODE上GITHUB的问题, 主要解决方法来自论坛和网络

绑定账号:

git config --global user.name "用户名"

git config --global user.email "用户邮箱"

设置让VSCode记住git账号和密码(好像也不用执行这句):

   

git config --global credential.helper store

删除账号记录:

1. 在凭据管理器下可以删除或者修改对应网址下登陆的账号

2.

git config --global --unset credential.helper
git config --global --unset user.name  
git config --global --unset user.email 

1 修改本地git邮箱和账号

查看用户名 :git config user.name

查看密码: git config user.password

查看邮箱:git config user.email

查看配置信息: $ git config --list  

添加或修改密码

git config --global user.password "xxxxx"

修改用户名

git config --global user.name "xxxx(新的用户名)"

修改密码git config --global user.password "xxxx(新的密码)"

修改邮箱

git config --global user.email "xxxx@xxx.com(新的邮箱)"

移除用户名和邮箱

git config --global --replace-all user.name"你的 git 的名称"

git config --global --replace-all uesr.email"你的 git 的邮箱"

2 修改本地密码(此操作是克隆项目时账号密码错误使用,可以在克隆报错时自动提示键入密码)

gitconfig--system--unsetcredential.helper

设置记住密码(默认15分钟):

git config --global credential.helper cache

如果想自己设置时间,可以这样做:

git config credential.helper 'cache --timeout=3600'

这样就设置一个小时之后失效

长期存储密码:

git config --global credential.helper store

增加远程地址的时候带上密码也是可以的。(推荐)

从仓库的config的里面修改url,后面加上密码

使用异常记录:

Failed to connect to github.com port 443: Timed out(Windows)

# 为全局的 git 项目都设置代理

git config --global http.proxy 127.0.0.1:1080 

# 设置当前代理
git config http.proxy http://127.0.0.1:2334

# 取消当前代理
git config --unset http.proxy

#取消全局代理
git config --global --unset http.proxy

#设置socks5代理
git config http.proxy socks5://127.0.0.1:10809
 

OpenSSL SSL_read: Connection was reset, errno 10054

git config --global http.sslVerify "false"  解除ssl验证

VSCODE +MINGW 调试C/C++:

VScode tasks.json和launch.json的设置 - 知乎 (zhihu.com)

(39条消息) VScode编写调试C/C++程序(详细整理)_Wendy的博客-CSDN博客_vscode调试c++

git子模块使用

Git Submodule管理项目子模块 - nicksheng - 博客园 (cnblogs.com)

git中submodule子模块的添加、使用和删除_guotianqing的博客-CSDN博客_git submodule 删除

Git的ssh配置_git ssh配置教程_龙井不是茶的博客-CSDN博客

清空GitHub仓库的历史提交记录(commits)_github删除commit记录-CSDN博客

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值