Git Tips

1、有些FQ需要设置代理

设置你自己的IP和host

git config --global http.proxy 'socks5://127.0.0.1:1080'
git config --global https.proxy 'socks5://127.0.0.1:1080'

使用git config --global --list命令查看是否配置成功

移除git代理配置,可以用下面命令

git config --global --unset http.proxy
git config --global --unset https.proxy

2、.gitignore 不起作用问题的解决

git rm -r --cached .  
git add .
git commit -m "update gitignore"

3、解决Mac下SourceTree每次都让输入密码的问题

1、命令行进入项目目录,输入:
git config --global credential.helper store
2、在source tree更新代码,提示输入密码,输入一次后以后就不需要输入了

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。