|
|
@@ -1,16 +1,24 @@
|
|
|
<local:MyHint Margin="0,0,0,15" Text="该帮助页面还需要根据规范重新整理格式,优化排版与文案。如果你感兴趣也可以来帮帮忙!" IsWarn="False" />
|
|
|
|
|
|
-<local:MyHint Margin="0,0,0,10" Text="说明:因 Git GUI 版本不普及,将不编写进此帮助条目内,仅提供外站教程。" IsWarn="False" />
|
|
|
-<local:MyTextButton Margin="0,0,0,20" HorizontalAlignment="Center"
|
|
|
- Text="点击查看 Git GUI 操作指南" EventType="打开网页" EventData="https://www.runoob.com/w3cnote/git-gui-window.html" />
|
|
|
-<local:MyCard Title="使用 Git 获取帮助库">
|
|
|
+<local:MyCard Title="前言">
|
|
|
<StackPanel Margin="25,40,23,15">
|
|
|
-
|
|
|
<TextBlock Margin="0,0,0,4" LineHeight="17"
|
|
|
- Text="按照“参与完善 PCL2 帮助库”条目下的“获取帮助库”的指引,请确保你已经注册 GitHub、Fork 仓库 即可进行下一步"/>
|
|
|
+ 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="要想使用 Git 进行完善PCL2帮助库,Git 工具是不可或缺的,请点击对应版本下载对应文件,或访问网页下载。"/>
|
|
|
+ Text="在开始之前请确保已经根据“参与完善 PCL2 帮助库”条目下的“获取帮助库”的指引,注册了 GitHub 并 Fork 了仓库。"/>
|
|
|
+ <TextBlock Margin="0,0,0,4" LineHeight="17"
|
|
|
+ Text="在开始获取 PCL2 帮助库之前不可缺少的是安装 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://npm.taobao.org/mirrors/git-for-windows/v2.31.1.windows.1/Git-2.31.1-32-bit.exe" />
|
|
|
@@ -21,22 +29,21 @@
|
|
|
<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 的文件夹。"/>
|
|
|
+ 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,Musics" />
|
|
|
</StackPanel>
|
|
|
<TextBlock Margin="0,10,0,4" LineHeight="17"
|
|
|
- Text="2.进入 Help 文件夹,右键鼠标,单击 Git Bash Here"/>
|
|
|
-
|
|
|
- <local:MyCard Title="使用 Git 与 GitHub 账户建立连接(对与此步骤在已使用过Git的用户是无需的查看的)" Margin="0,10,0,15" CanSwap="True" IsSwaped="True">
|
|
|
- <StackPanel Margin="25,40,23,15">
|
|
|
+ Text="2.进入 Help 文件夹,右键鼠标,单击 Git Bash Here,如果你愿意,也可以使用其他命令行工具。"/>
|
|
|
<TextBlock Margin="0,5,0,4" LineHeight="17"
|
|
|
- Text="3.在启动的 Git 命令行窗口中,逐行输入 (点击按钮即可复制文本)"/>
|
|
|
+ Text="3.在启动的命令行窗口中,逐行执行以下指令 (点击按钮即可复制文本)"/>
|
|
|
|
|
|
+ <StackPanel Margin="25,0,0,0">
|
|
|
<TextBlock Margin="0,5,0,4" LineHeight="17"
|
|
|
- Text="①目的是生成公钥和私钥,与你的 GitHub 账号建立连接"/>
|
|
|
+ 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"
|
|
|
@@ -45,18 +52,13 @@
|
|
|
|
|
|
|
|
|
<TextBlock Margin="0,5,0,4" LineHeight="17"
|
|
|
- Text="建立过程中需要确认,请一直按回车"/>
|
|
|
+ Text="在建立过程中可以需要进行确认操作,请按照提示回车确认。"/>
|
|
|
|
|
|
<TextBlock Margin="0,5,0,4" LineHeight="17"
|
|
|
- Text="②点击复制后,粘贴至 资源管理器地址栏 ,回车即可打开"/>
|
|
|
+ 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="C:\User\你目前登录的电脑账户\.ssh\id_rsa.pub'" EventType="复制文本" EventData="%USERNAME%\.ssh\id_rsa.pub" />
|
|
|
-
|
|
|
- <local:MyButton MinWidth="140" Padding="13,0" Margin="0,0,20,0" HorizontalAlignment="Left" ColorType="Highlight"
|
|
|
- Text="打开资源管理器" EventType="打开文件" EventData="explorer.exe" />
|
|
|
- </StackPanel>
|
|
|
+ <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 ,标题任意,内容粘贴打开文件的内容"/>
|
|
|
@@ -75,33 +77,28 @@
|
|
|
Text="git config --global user.email '此处填写邮箱'" EventType="复制文本" EventData="git config --global user.email '此处填写邮箱'" />
|
|
|
</StackPanel>
|
|
|
|
|
|
- </StackPanel>
|
|
|
- </local:MyCard>
|
|
|
-
|
|
|
-
|
|
|
<TextBlock Margin="0,5,0,4" LineHeight="17"
|
|
|
- Text="4.初始化仓库及建立连接"/>
|
|
|
+ Text="如果你不想设置为全局用户,可以将上述命令中的 --global 部分删去,这样用户信息只在此库有效。"/>
|
|
|
|
|
|
- <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 init" EventType="复制文本" EventData="git init" />
|
|
|
+ </StackPanel>
|
|
|
+ </StackPanel>
|
|
|
+</local:MyCard>
|
|
|
|
|
|
- <local:MyButton MinWidth="140" Padding="13,0" Margin="0,0,20,0" HorizontalAlignment="Left"
|
|
|
- Text="git remote add origin 此处为仓库SSH(以.git结尾的链接)" EventType="复制文本" EventData="git remote add origin 此处为仓库SSH(以.git结尾的链接)" />
|
|
|
- </StackPanel>
|
|
|
|
|
|
+<local:MyCard Title="获取 PCL2 帮助库" CanSwap="true" IsSwaped="false">
|
|
|
+ <StackPanel Margin="25,40,23,15">
|
|
|
|
|
|
<TextBlock Margin="0,5,0,4" LineHeight="17"
|
|
|
- Text="5.克隆仓库到本地"/>
|
|
|
+ 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 pull --rebase origin master" EventType="复制文本" EventData="git pull --rebase origin master" />
|
|
|
+ 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="6.开始在克隆到本地的仓库中使用本地代码编辑器编写代码,编写完成后推送编写的文件到远程仓库"/>
|
|
|
+ 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"
|
|
|
@@ -109,21 +106,27 @@
|
|
|
<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 -u origin master" EventType="复制文本" EventData="git push -u origin master" />
|
|
|
+ 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="7.再到原仓库中,新建合并请求,即可提交代码审核"/>
|
|
|
+ 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 Text="注意,在请求合并之前请先请确保你的仓库分支与原仓库是同步的,GitHub不会自动同步你的分支仓库,请在你的仓库中新建合并请求选择“compare across forks(跨叉比较)”然后将(Head)头仓库选择为原仓库,(Base)合并仓库选择为你的分支仓库,创建合并请求,并拉取合并,进行同步仓库处理。" />
|
|
|
-
|
|
|
+ <local:MyHint Margin="0,15,0,0" Text="注意,在请求合并之前请先请确保你的仓库分支与原仓库是同步的,GitHub 不会自动同步你的分支仓库,请在你的仓库中新建合并请求选择 “compare across forks(跨叉比较)” 然后将 (Head) 头仓库选择为原仓库,(Base) 合并仓库选择为你的分支仓库,创建合并请求,并拉取合并,进行同步仓库处理。" />
|
|
|
<TextBlock Margin="0,5,0,4" LineHeight="17"
|
|
|
- Text="以上内容为详细的 Git 提交帮助 如果还是无法理解,建议百度 。"/>
|
|
|
+ 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" IsWarn="False" />
|
|
|
+<local:MyHint Margin="0,0,0,15" Text="作者:XiaoFans、龙腾猫跃、林小槐" IsWarn="False" />
|