From c0eb277447299ce7c884930af5c63a266197dce1 Mon Sep 17 00:00:00 2001 From: dongxiancun <dongxiancun@cmhi.chinamobile.com> Date: Mon, 17 Jun 2019 17:48:56 +0800 Subject: [PATCH] =?UTF-8?q?Mod=20=20aaa-12=20=E4=BF=AE=E6=94=B9readme.md?= =?UTF-8?q?=E7=9A=84=E6=A0=BC=E5=BC=8F=E9=94=99=E8=AF=AF=20RCA=EF=BC=9A=20?= =?UTF-8?q?SOL=EF=BC=9A=20=E4=BF=AE=E6=94=B9=E4=BA=BA=EF=BC=9Adongxiancun?= =?UTF-8?q?=20=E6=A3=80=E8=A7=86=E4=BA=BA=EF=BC=9Adongxiancun?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Readme.md | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/Readme.md b/Readme.md index 3206cd272..af7d22587 100755 --- a/Readme.md +++ b/Readme.md @@ -117,7 +117,29 @@ sGATE_GIT_VERS 记录了当前源码在 gitlab 服务器上面的版本信息 #### 7. Windows 开发环境搭建 -+ 解决 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+版本) + + mkdir secogateway + cd secogateway + git init + git remote add -f http://git.komect.net/ISG/secogateway.git + git config core.sparsecheckout true +3. 设置检出的过滤规则:示例屏蔽kernel文件夹 + + echo '/*' >> .git/info/sparse-checkout #这一步不可省略 + echo '!/kernel/' >> .git/info/sparse-checkout +4. 命令行 执行检出:(或使用TortoiseGit等图形化工具,执行检出) + + git checkout master + +---------------- ++ 方法二:windows下模拟linux文件系统 1. 下载并安装 [cygwin](http://cygwin.com/install.html) 2. 运行安装程序  @@ -131,7 +153,9 @@ git clone [git@git.komect.net:ISG/secogateway.git](http://git.komect.net/ISG/sec 8. git clone 完成后,可以从 E:\my_projects\secogateway 访问文件。警告文件为内核源码,可以忽略  9. 可以将 kernel/linux-4.14.83/ 添加到本地 .gitignore 文件中,但不要将 .gitignore 文件提交到服务器 -+ 将服务器目录映射到 Windows 驱动器 +--------------- ++ 方法三:将服务器目录映射到 Windows 驱动器(**网络IO非常慢,建议在服务器上编译**) + 1. 安装 [sshfs](https://github.com/billziss-gh/sshfs-win) 2. 安装 [WinFsp](http://www.secfs.net/winfsp/) 3. 参照 [WinFsp文档](http://www.secfs.net/winfsp/) 进行配置