|
@@ -1,110 +0,0 @@
|
|
|
-<local:MyHint Margin="0,0,0,15" Text="该帮助页面还需要根据规范重新整理格式,优化排版与文案。如果你感兴趣也可以来帮帮忙!" IsWarn="False" />
|
|
|
|
|
-
|
|
|
|
|
-<local:MyCard Title="前言">
|
|
|
|
|
- <StackPanel Margin="25,40,23,15">
|
|
|
|
|
- <TextBlock Margin="0,0,0,4" LineHeight="17"
|
|
|
|
|
- Text="本篇主要介绍使用 Git Bash 命令行的方式获取帮助库。" />
|
|
|
|
|
- <TextBlock Margin="0,0,0,4"
|
|
|
|
|
- Text="因 Git GUI 版本不普及,将不编写进此帮助条目内,如果你正在寻找它,可以跳转到下方外站教程。" />
|
|
|
|
|
- <local:MyButton MinWidth="140" Height="35px" HorizontalAlignment="Left" ColorType="Highlight"
|
|
|
|
|
- Text="Git 可视化极简易教程" EventType="打开网页" EventData="https://www.runoob.com/w3cnote/git-gui-window.html" />
|
|
|
|
|
- </StackPanel>
|
|
|
|
|
-</local:MyCard>
|
|
|
|
|
-
|
|
|
|
|
-<local:MyCard Title="获取并配置 Git 工具" CanSwap="true" IsSwaped="false">
|
|
|
|
|
- <StackPanel Margin="25,40,23,15">
|
|
|
|
|
- <local:MyHint Margin="0,0,0,15" Text="如果你已经在之前使用过 Git,可以直接跳过此步骤。" IsWarn="False" />
|
|
|
|
|
- <TextBlock Margin="0,0,0,4" LineHeight="17"
|
|
|
|
|
- Text="在开始之前请确保已经根据“参与完善 PCL 帮助库”条目下的“获取帮助库”的指引,注册了 GitHub 并 Fork 了仓库。"/>
|
|
|
|
|
- <TextBlock Margin="0,0,0,4" LineHeight="17"
|
|
|
|
|
- Text="在开始获取 PCL 帮助库之前不可缺少的是安装 Git 工具,你可以直接通过下面的按钮下载,或访问网页下载。"/>
|
|
|
|
|
- <StackPanel Height="35" Margin="0,4,0,10" Orientation="Horizontal">
|
|
|
|
|
- <local:MyButton MinWidth="140" Padding="13,0" Margin="0,0,20,0" HorizontalAlignment="Left" ColorType="Highlight"
|
|
|
|
|
- Text="下载 Git (32 位)" EventType="下载文件" EventData="https://registry.npmmirror.com/-/binary/git-for-windows/v2.39.2.windows.1/Git-2.39.2-32-bit.exe" />
|
|
|
|
|
- <local:MyButton MinWidth="140" Padding="13,0" Margin="0,0,20,0" HorizontalAlignment="Left" ColorType="Highlight"
|
|
|
|
|
- Text="下载 Git (64 位)" EventType="下载文件" EventData="https://registry.npmmirror.com/-/binary/git-for-windows/v2.39.2.windows.1/Git-2.39.2-64-bit.exe" />
|
|
|
|
|
- <local:MyButton MinWidth="140" Padding="13,0" Margin="0,0,20,0" HorizontalAlignment="Left"
|
|
|
|
|
- Text="访问官网" EventType="打开网页" EventData="https://git-scm.com/" />
|
|
|
|
|
- <local:MyButton MinWidth="140" Padding="13,0" Margin="0,0,20,0" HorizontalAlignment="Left"
|
|
|
|
|
- Text="访问镜像" EventType="打开网页" EventData="https://npm.taobao.org/mirrors/git-for-windows/" />
|
|
|
|
|
- </StackPanel>
|
|
|
|
|
- <TextBlock Margin="0,10,0,4" LineHeight="17"
|
|
|
|
|
- Text="1. 点击下方按钮,进入 PCL 文件夹,创建名称为 Help 的文件夹。"/>
|
|
|
|
|
- <StackPanel Height="35" Margin="0,4,0,10" Orientation="Horizontal">
|
|
|
|
|
- <local:MyButton MinWidth="140" Padding="13,0" Margin="0,0,20,0" HorizontalAlignment="Left" ColorType="Highlight"
|
|
|
|
|
- Text="打开文件夹" EventType="打开文件" EventData="explorer.exe|/select,Help" />
|
|
|
|
|
- </StackPanel>
|
|
|
|
|
- <TextBlock Margin="0,10,0,4" LineHeight="17"
|
|
|
|
|
- Text="2. 进入 Help 文件夹,右键鼠标,单击"Git Bash Here"。你也可以使用其他命令行工具。"/>
|
|
|
|
|
- <TextBlock Margin="0,5,0,4" LineHeight="17"
|
|
|
|
|
- Text="3. 在启动的命令行窗口中,逐行执行以下指令 (点击按钮即可复制文本)。"/>
|
|
|
|
|
- <StackPanel Margin="25,0,0,0">
|
|
|
|
|
- <TextBlock Margin="0,5,0,4" LineHeight="17"
|
|
|
|
|
- Text="① 生成公钥和私钥,与你的 GitHub 账号建立连接。"/>
|
|
|
|
|
- <StackPanel Height="35" Margin="0,4,0,10" Orientation="Horizontal">
|
|
|
|
|
- <local:MyButton MinWidth="140" Padding="13,0" Margin="0,0,20,0" HorizontalAlignment="Left"
|
|
|
|
|
- Text="ssh-keygen -t rsa -C '此处填写邮箱'" EventType="复制文本" EventData="ssh-keygen -t rsa -C '此处填写邮箱'" />
|
|
|
|
|
- </StackPanel>
|
|
|
|
|
- <TextBlock Margin="0,5,0,4" LineHeight="17"
|
|
|
|
|
- Text="在建立过程中可以需要进行确认操作,请按照提示回车确认。"/>
|
|
|
|
|
- <TextBlock Margin="0,5,0,4" LineHeight="17"
|
|
|
|
|
- Text="② 点击下方按钮打开生成的密钥文件。"/>
|
|
|
|
|
- <local:MyButton MinWidth="140" Padding="13,0" Margin="0,0,20,0" HorizontalAlignment="Left" Height="35px"
|
|
|
|
|
- Text="打开资源管理器" EventType="打开文件" EventData="explorer.exe|%homepath%\.ssh\id_rsa.pub" />
|
|
|
|
|
- <TextBlock Margin="0,5,0,4" LineHeight="17"
|
|
|
|
|
- Text="③ 进入网页版 GitHub 的设置中,打开 SSH and GPG keys 项,点击 New SSH Key,标题任意,内容粘贴打开文件的内容。"/>
|
|
|
|
|
- <StackPanel Height="35" Margin="0,4,0,10" Orientation="Horizontal">
|
|
|
|
|
- <local:MyButton MinWidth="140" Padding="13,0" Margin="0,0,20,0" HorizontalAlignment="Left"
|
|
|
|
|
- Text="访问设置" EventType="打开网页" EventData="https://github.com/settings/keys" />
|
|
|
|
|
- </StackPanel>
|
|
|
|
|
- <TextBlock Margin="0,5,0,4" LineHeight="17"
|
|
|
|
|
- Text="④ 设置用户信息(填写和上述操作一致的邮箱)。"/>
|
|
|
|
|
- <StackPanel Height="35" Margin="0,4,0,10" Orientation="Horizontal">
|
|
|
|
|
- <local:MyButton MinWidth="140" Padding="13,0" Margin="0,0,20,0" HorizontalAlignment="Left"
|
|
|
|
|
- Text="git config --global user.name '此处填写名称'" EventType="复制文本" EventData="git config --global user.name '此处填写名称'" />
|
|
|
|
|
- <local:MyButton MinWidth="140" Padding="13,0" Margin="0,0,20,0" HorizontalAlignment="Left"
|
|
|
|
|
- Text="git config --global user.email '此处填写邮箱'" EventType="复制文本" EventData="git config --global user.email '此处填写邮箱'" />
|
|
|
|
|
- </StackPanel>
|
|
|
|
|
- <TextBlock Margin="0,5,0,4" LineHeight="17"
|
|
|
|
|
- Text="如果你不想设置为全局用户,可以将上述命令中的 --global 部分删去,这样用户信息只在此库有效。"/>
|
|
|
|
|
- </StackPanel>
|
|
|
|
|
- </StackPanel>
|
|
|
|
|
-</local:MyCard>
|
|
|
|
|
-
|
|
|
|
|
-<local:MyCard Title="获取 PCL 帮助库" CanSwap="true" IsSwaped="false">
|
|
|
|
|
- <StackPanel Margin="25,40,23,15">
|
|
|
|
|
- <TextBlock Margin="0,5,0,4" LineHeight="17"
|
|
|
|
|
- Text="1. 克隆仓库到本地。"/>
|
|
|
|
|
- <StackPanel Height="35" Margin="0,4,0,10" Orientation="Horizontal">
|
|
|
|
|
- <local:MyButton MinWidth="140" Padding="13,0" Margin="0,0,20,0" HorizontalAlignment="Left"
|
|
|
|
|
- Text="git clone https://github.com/LTCatt/PCL2Help.git" EventType="复制文本" EventData="git clone https://github.com/LTCatt/PCL2Help.git" />
|
|
|
|
|
- </StackPanel>
|
|
|
|
|
- <TextBlock Margin="0,5,0,4" LineHeight="17"
|
|
|
|
|
- Text="2. 开始在克隆到本地的仓库中使用本地代码编辑器编写代码,编写完成后推送编写的文件到远程仓库。"/>
|
|
|
|
|
- <StackPanel Height="35" Margin="0,4,0,10" Orientation="Horizontal">
|
|
|
|
|
- <local:MyButton MinWidth="140" Padding="13,0" Margin="0,0,20,0" HorizontalAlignment="Left"
|
|
|
|
|
- Text="git add ." EventType="复制文本" EventData="git add ." />
|
|
|
|
|
- <local:MyButton MinWidth="140" Padding="13,0" Margin="0,0,20,0" HorizontalAlignment="Left"
|
|
|
|
|
- Text="git commit -m '此处填写修改记录'" EventType="复制文本" EventData="git commit -m '此处填写修改记录'" />
|
|
|
|
|
- <local:MyButton MinWidth="140" Padding="13,0" Margin="0,0,20,0" HorizontalAlignment="Left"
|
|
|
|
|
- Text="git push" EventType="复制文本" EventData="git push" />
|
|
|
|
|
- </StackPanel>
|
|
|
|
|
- <TextBlock Margin="0,5,0,4" LineHeight="17"
|
|
|
|
|
- Text="以上指令的含义分别是,将所有更改添加到缓存,创建新的提交,同步提交。"/>
|
|
|
|
|
- <TextBlock Margin="0,5,0,4" LineHeight="17"
|
|
|
|
|
- Text="3. 最后回到原仓库中,新建合并请求,提交代码审核。"/>
|
|
|
|
|
- <StackPanel Height="35" Margin="0,4,0,10" Orientation="Horizontal">
|
|
|
|
|
- <local:MyButton MinWidth="140" Padding="13,0" Margin="0,0,20,0" HorizontalAlignment="Left"
|
|
|
|
|
- Text="新建合并请求" EventType="打开网页" EventData="https://github.com/LTCatt/PCL2Help/compare" />
|
|
|
|
|
- </StackPanel>
|
|
|
|
|
- <local:MyHint Margin="0,15,0,0" Text="注意,在请求合并之前请先请确保你的仓库分支与原仓库是同步的,GitHub 不会自动同步你的分支仓库,请在 Pull Request 前进入你的 Fork 仓库界面,点击 “Fetch upstream”,再点击“Fetch and merge” 以同步上游仓库。" />
|
|
|
|
|
- <TextBlock Margin="0,5,0,4" LineHeight="17"
|
|
|
|
|
- Text="如果你没法很好的理解上面的警告,可以跳转到下方外站教程详细学习。如果依旧无法理解,也可以使用不推荐但是方便的重新 Fork 来解决。"/>
|
|
|
|
|
- <local:MyButton Height="35px" HorizontalAlignment="Left" ColorType="Highlight" Margin="0,0,0,15"
|
|
|
|
|
- Text="GitHub 进行 Fork 后如何与原仓库同步" EventType="打开网页" EventData="https://github.com/selfteaching/the-craft-of-selfteaching/issues/67" />
|
|
|
|
|
- <TextBlock Margin="0,5,0,4" LineHeight="17" Padding="15,0,0,15"
|
|
|
|
|
- Text="以上内容为详细的 Git 提交帮助,如果还是无法理解,可以通过搜索引擎进一步学习。"/>
|
|
|
|
|
- </StackPanel>
|
|
|
|
|
-</local:MyCard>
|
|
|
|
|
-
|
|
|
|
|
-<local:MyHint Margin="0,0,0,15" Text="作者:XiaoFans、龙腾猫跃、林小槐、WTP016" IsWarn="False" />
|
|
|