生而为人

程序员的自我修养

0%

问题解决

[toc]

网络问题

github 网址访问不了

GitHub打不开的解决方案(超简单)

  1. https://sites.ipaddress.com/github.com/
  2. https://sites.ipaddress.com/fastly.net/
  3. 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:

1
> ipconfig /flushdns

问题

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)')

解决办法

  1. 按照指导重新设置user.emailuser.name,注意变量名称不要设置错了
  2. git var GIT_AUTHOR_IDENT 验证是否设置成功。

参考资料:

  1. git config doc
  2. Configuring Git to handle line endings