Skip to content

Commit d931cc5

Browse files
authored
docs: 添加了修复 Git for Windows 报错的内容 (#38)
1 parent 5e587a3 commit d931cc5

File tree

2 files changed

+45
-0
lines changed

2 files changed

+45
-0
lines changed

README.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,28 @@
8080
git clone https://github.com/nolebase/nolebase
8181
```
8282

83+
#### 使用的是 Windows 吗
84+
85+
> [!IMPORTANT]
86+
> 如果你使用的是 [Git for Windows](https://gitforwindows.org/) ,那么可能会在执行上述命令时,遇到类似这样的报错:
87+
>
88+
> ```PowerShell
89+
> PS D:\> git clone https://github.com/nolebase/nolebase
90+
> ...
91+
> error: invalid path 'x: xxx.md'
92+
> fatal: unable to checkout working tree
93+
> warning: Clone succeeded, but checkout failed.
94+
> You can inspect what was checked out with 'git status'
95+
> and retry with 'git restore --source=HEAD :/'
96+
> ```
97+
>
98+
> 这是 [Git for Windows](https://gitforwindows.org/) 的默认配置导致的[问题](https://github.com/git-for-windows/git/issues/2777)。
99+
>
100+
> 你可以在命令行窗口中输入下面的命令来解决这个问题:
101+
> ```PowerShell
102+
> git config --global core.protectNTFS false
103+
> ```
104+
83105
### 如何使用、运行或者部署
84106
85107
完成了下载了吗?很好,恭喜你已经完成了很艰难的一步!

笔记/index.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,29 @@
6060
git clone https://github.com/nolebase/nolebase
6161
```
6262

63+
#### 使用的是 Windows 吗
64+
65+
> [!IMPORTANT]
66+
> 如果你使用的是 [Git for Windows](https://gitforwindows.org/) ,那么可能会在执行上述命令时,遇到类似这样的报错:
67+
>
68+
> ```PowerShell
69+
> PS D:\> git clone https://github.com/nolebase/nolebase
70+
> ...
71+
> error: invalid path 'x: xxx.md'
72+
> fatal: unable to checkout working tree
73+
> warning: Clone succeeded, but checkout failed.
74+
> You can inspect what was checked out with 'git status'
75+
> and retry with 'git restore --source=HEAD :/'
76+
> ```
77+
>
78+
> 这是 [Git for Windows](https://gitforwindows.org/) 的默认配置导致的[问题](https://github.com/git-for-windows/git/issues/2777)。
79+
>
80+
> 你可以在命令行窗口中输入下面的命令来解决这个问题:
81+
> ```PowerShell
82+
> git config --global core.protectNTFS false
83+
> ```
84+
85+
6386
### 如何使用、运行或者部署
6487
6588
完成了下载了吗?很好,恭喜你已经完成了很艰难的一步!

0 commit comments

Comments
 (0)