Skip to content

Commit

Permalink
发布博客,时间:2024-04-25 21:11:28
Browse files Browse the repository at this point in the history
  • Loading branch information
whp98 committed Apr 25, 2024
1 parent 3c28f96 commit 2310118
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
26 changes: 26 additions & 0 deletions docs/Git版本管理/Git下载自动替换协议.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Git下载自动替换协议


## git协议用https下载 代理友好
```powershell
git config --global url."https://github.com/".insteadOf [email protected]:
git config --global url."https://".insteadOf git://
git config --global url."https://".insteadOf git+ssh://
```
取消
```powershell
git config --global --unset url."https://github.com/".insteadOf
git config --global --unset url."https://".insteadOf
```

## https协议用git下载 可能更安全

```powershell
git config --global url."[email protected]:".insteadOf https://github.com/
git config --global url."git://".insteadOf https://
```
取消
```powershell
git config --global --unset url."[email protected]:".insteadOf
git config --global --unset url."git://".insteadOf
```
1 change: 1 addition & 0 deletions docs/Git版本管理/index.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Git版本管理
- [Github老仓库将主分支重命名成main](./Github老仓库将主分支重命名成main.md)
- [Git下载自动替换协议](./Git下载自动替换协议.md)
- [Git修改提交时间](./Git修改提交时间.md)
- [Git删除某个文件的全部历史记录](./Git删除某个文件的全部历史记录.md)
- [Git删除误提交的内容](./Git删除误提交的内容.md)
Expand Down

0 comments on commit 2310118

Please sign in to comment.