Merge branch 'master' of http://git.komect.net/ISG/secogateway
This commit is contained in:
commit
f31fc8d6ef
27
Readme.md
27
Readme.md
|
@ -117,8 +117,33 @@ sGATE_GIT_VERS 记录了当前源码在 gitlab 服务器上面的版本信息
|
||||||
|
|
||||||
#### 7. Windows 开发环境搭建
|
#### 7. Windows 开发环境搭建
|
||||||
|
|
||||||
+ 解决 git 出错的方法
|
+ 解决 git 出错的方法一(**适用于不在windows下查看、编辑linux内核代码的开发人员**)
|
||||||
|
1. 说明
|
||||||
|
**windows操作系统git下载克隆(或屏蔽)部分文件代码的方法**
|
||||||
|
使用以下代码的重点是,不能使用POWERSHELL/CMD,只能使用git bash,如果在POWERSHELL/CMD中操作,在最后一步命令的时候会报以下错误:
|
||||||
|
<code>error: Sparse checkout leaves no entry on working directory</code>
|
||||||
|
2. 准备工作:启用git的sparse checkout功能(要求Cit 1.7+版本)
|
||||||
|
|
||||||
|
<pre>
|
||||||
|
mkdir secogateway
|
||||||
|
cd secogateway
|
||||||
|
git init
|
||||||
|
git remote add -f http://git.komect.net/ISG/secogateway.git
|
||||||
|
git config core.sparsecheckout true
|
||||||
|
</pre>
|
||||||
|
3. 设置检出的过滤规则:示例屏蔽kernel文件夹
|
||||||
|
|
||||||
|
<pre>
|
||||||
|
echo '/*' >> .git/info/sparse-checkout #这一步不可省略
|
||||||
|
echo '!/kernel/' >> .git/info/sparse-checkout
|
||||||
|
</pre>
|
||||||
|
4. 命令行 执行检出:(或使用TortoiseGit等图形化工具,执行检出)
|
||||||
|
|
||||||
|
<pre>
|
||||||
|
git checkout master
|
||||||
|
</pre>
|
||||||
|
|
||||||
|
+ 解决 git 出错的方法二
|
||||||
1. 下载并安装 [cygwin](http://cygwin.com/install.html)
|
1. 下载并安装 [cygwin](http://cygwin.com/install.html)
|
||||||
2. 运行安装程序 ![安装界面](./docs/img/1.PNG)
|
2. 运行安装程序 ![安装界面](./docs/img/1.PNG)
|
||||||
3. 在源选择界面中按图添加163源 [http://mirrors.163.com/cygwin/](http://mirrors.163.com/cygwin/) ![源设置界面](./docs/img/6.PNG)
|
3. 在源选择界面中按图添加163源 [http://mirrors.163.com/cygwin/](http://mirrors.163.com/cygwin/) ![源设置界面](./docs/img/6.PNG)
|
||||||
|
|
Loading…
Reference in New Issue