[toc]
网络问题
github 网址访问不了
GitHub打不开的解决方案(超简单)
- https://sites.ipaddress.com/github.com/
- https://sites.ipaddress.com/fastly.net/
- https://sites.ipaddress.com/assets-cdn.github.com/
My IP | IP Address Tools | IP Geolocation | Website Traffic Checker
1 2 3 4 5 6
| 140.82.113.3 github.com 151.101.1.194 github.global.ssl.fastly.net 185.199.108.153 assets-cdn.github.com 185.199.109.153 assets-cdn.github.com 185.199.110.153 assets-cdn.github.com 185.199.111.153 assets-cdn.github.com
|
Mac:
1 2 3 4
| sudo vi /etc/hosts
# 刷新DNS sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder
|
Windows:
问题
LF will be replaced by CRLF
1 2 3 4
| git config core.autocrlf false 1. true: 2. false: 3. input:
|
切换分支时 如何保证文件完全与线上一致,即其他分支新加的文件被删掉
命令报错
Author identity unknown
报错信息
1 2 3 4 5 6 7 8 9 10 11 12 13
| Author identity unknown
*** Please tell me who you are.
Run
git config --global user.email "you@example.com" git config --global user.name "Your Name"
to set your account's default identity. Omit --global to set the identity only in this repository.
fatal: unable to auto-detect email address (got 'jingqi@DESKTOP-BKUPVT9.(none)')
|
解决办法
- 按照指导重新设置
user.email和user.name,注意变量名称不要设置错了
- 用
git var GIT_AUTHOR_IDENT 验证是否设置成功。
参考资料:
- git config doc
- Configuring Git to handle line endings