1. Open the Hosts file
Windows Hosts path:
C:\Windows\System32\drivers\etc
Since the file has no suffix, you can right-click and choose to open with Notepad, as shown below:
2. Append the domain name address
Find the following two github IP addresses in https://www.ipaddress.com/ :
github.com
github.global.ssl.fastly.net
As shown in the figure:
directly paste the IP address and domain name to the end of the Hosts file, format IP space domain name, such as:
after both are done, save and exit.
3. Flush the DNS cache
Open in cmd or terminal and enter the command:
ipconfig /flushdns
ok, try git clone again, it will be much faster.