-
Notifications
You must be signed in to change notification settings - Fork 0
/
search.xml
120 lines (96 loc) · 25.4 KB
/
search.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
<?xml version="1.0" encoding="utf-8"?>
<search>
<entry>
<title>Hello World</title>
<url>/2024/04/01/hello-world/</url>
<content><![CDATA[<p>Welcome to <a href="https://hexo.io/">Hexo</a>! This is your very first post. Check <a href="https://hexo.io/docs/">documentation</a> for more info. If you get any problems when using Hexo, you can find the answer in <a href="https://hexo.io/docs/troubleshooting.html">troubleshooting</a> or you can ask me on <a href="https://github.com/hexojs/hexo/issues">GitHub</a>.</p>
<h2 id="Quick-Start"><a href="#Quick-Start" class="headerlink" title="Quick Start"></a>Quick Start</h2><h3 id="Create-a-new-post"><a href="#Create-a-new-post" class="headerlink" title="Create a new post"></a>Create a new post</h3><figure class="highlight bash"><table><tr><td class="code"><pre><span class="line">$ hexo new <span class="string">"My New Post"</span></span><br></pre></td></tr></table></figure>
<p>More info: <a href="https://hexo.io/docs/writing.html">Writing</a></p>
<h3 id="Run-server"><a href="#Run-server" class="headerlink" title="Run server"></a>Run server</h3><figure class="highlight bash"><table><tr><td class="code"><pre><span class="line">$ hexo server</span><br></pre></td></tr></table></figure>
<p>More info: <a href="https://hexo.io/docs/server.html">Server</a></p>
<h3 id="Generate-static-files"><a href="#Generate-static-files" class="headerlink" title="Generate static files"></a>Generate static files</h3><figure class="highlight bash"><table><tr><td class="code"><pre><span class="line">$ hexo generate</span><br></pre></td></tr></table></figure>
<p>More info: <a href="https://hexo.io/docs/generating.html">Generating</a></p>
<h3 id="Deploy-to-remote-sites"><a href="#Deploy-to-remote-sites" class="headerlink" title="Deploy to remote sites"></a>Deploy to remote sites</h3><figure class="highlight bash"><table><tr><td class="code"><pre><span class="line">$ hexo deploy</span><br></pre></td></tr></table></figure>
<p>More info: <a href="https://hexo.io/docs/one-command-deployment.html">Deployment</a></p>
]]></content>
</entry>
<entry>
<title>GitHub Hexo 搭建个人博客页面</title>
<url>/2024/04/02/hexo%E4%B8%AA%E4%BA%BA%E5%8D%9A%E5%AE%A2/</url>
<content><![CDATA[<p>操作系统:Windows 11<br>测试日期:2024年4月1日</p>
<h3 id="Hexo安装"><a href="#Hexo安装" class="headerlink" title="Hexo安装"></a>Hexo安装</h3><p>首先需要安装 </p>
<ul>
<li>Node.js</li>
<li>Git</li>
</ul>
<p><code>npm install -g hexo-cli</code></p>
<p>判断安装是否成功 <code>hexo -v</code></p>
<p>创建一个新文件夹用于存放站点相关配置文件,进入文件夹目录</p>
<figure class="highlight bash"><table><tr><td class="code"><pre><span class="line">hexo init</span><br><span class="line">npm install</span><br></pre></td></tr></table></figure>
<p>hexo 生成与本地服务启动</p>
<figure class="highlight bash"><table><tr><td class="code"><pre><span class="line">hexo g</span><br><span class="line">hexo s</span><br></pre></td></tr></table></figure>
<p>hexo 个人博客部署</p>
<figure class="highlight bash"><table><tr><td class="code"><pre><span class="line">hexo d</span><br><span class="line"></span><br><span class="line">output:</span><br><span class="line">INFO Validating config</span><br><span class="line">ERROR Deployer not found: git</span><br><span class="line"></span><br><span class="line"></span><br><span class="line">npm install hexo-deployer-git --save</span><br><span class="line">hexo d </span><br></pre></td></tr></table></figure>
<h2 id="Reference"><a href="#Reference" class="headerlink" title="Reference"></a>Reference</h2><p><a href="https://hexo.io/zh-cn/docs/">Hexo Doc</a><br><a href="https://nodejs.org/en">Node.js</a><br><a href="https://zhuanlan.zhihu.com/p/655349835">Github + Hexo 搭建个人博客教程</a><br><a href="https://blog.csdn.net/Java_Mike/article/details/96456318">解决 hexo d 命令错误提示 Deployer not found: git</a><br><a href="https://blog.csdn.net/JesseXW/article/details/135649752">Hexo butterfly 主题美化</a><br><a href="https://zhuanlan.zhihu.com/p/641732902">Hexo butterfly 美化</a></p>
<h3 id="Hexo-常用命令"><a href="#Hexo-常用命令" class="headerlink" title="Hexo 常用命令"></a>Hexo 常用命令</h3><figure class="highlight bash"><table><tr><td class="code"><pre><span class="line">npm install hexo -g <span class="comment"># 安装 hexo</span></span><br><span class="line">npm update hexo -g <span class="comment"># 升级</span></span><br><span class="line">hexo init <span class="comment"># 初始化博客</span></span><br><span class="line"></span><br><span class="line">hexo n <span class="string">"我的博客"</span></span><br><span class="line">hexo new <span class="string">"我的博客"</span> <span class="comment"># 新建文章</span></span><br><span class="line">hexo g</span><br><span class="line">hexo generate <span class="comment">#生成</span></span><br><span class="line">hexo s</span><br><span class="line">hexo server <span class="comment"># 启动服务预览</span></span><br><span class="line">hexo d</span><br><span class="line">hexo deploy <span class="comment"># 部署</span></span><br><span class="line"></span><br><span class="line">hexo server <span class="comment">#Hexo会监视文件变动并自动更新,无须重启服务器</span></span><br><span class="line">hexo server -s <span class="comment">#静态模式</span></span><br><span class="line">hexo server -p 5000 <span class="comment">#更改端口</span></span><br><span class="line">hexo server -i 192.168.1.1 <span class="comment">#自定义 IP</span></span><br><span class="line">hexo clean <span class="comment">#清除缓存,若是网页正常情况下可以忽略这条命令</span></span><br><span class="line"></span><br></pre></td></tr></table></figure>]]></content>
</entry>
<entry>
<title>黑马程序员 Git 教程笔记</title>
<url>/2024/04/02/%E9%BB%91%E9%A9%AC%E7%A8%8B%E5%BA%8F%E5%91%98-Git-%E6%95%99%E7%A8%8B%E7%AC%94%E8%AE%B0/</url>
<content><![CDATA[<p>Git 工作流程<br>Git 常用命令<br>Git 代码托管服务<br>IDEA 中操作 Git</p>
<h3 id="Git-工作流程图"><a href="#Git-工作流程图" class="headerlink" title="Git 工作流程图"></a>Git 工作流程图</h3><p><img src="/2024/04/02/%E9%BB%91%E9%A9%AC%E7%A8%8B%E5%BA%8F%E5%91%98-Git-%E6%95%99%E7%A8%8B%E7%AC%94%E8%AE%B0/image.png" alt="alt text"></p>
<ol>
<li>clone (克隆): 从远程仓库中克隆代码到本地仓库;</li>
<li>checkout (检出): 从本地仓库中检出一个仓库分支然后进行修订;</li>
<li>add (添加): 在提交前先将代码提交到暂存区;</li>
<li>commit (提交): 提交到本地仓库,本地仓库中保存修改的各个历史版本;</li>
<li>fetch (抓取): 从远程仓库,抓取到本地仓库,不进行任何的合并动作,一般操作比较少;</li>
<li>pull (拉取): 从远程仓库拉到本地仓库,自动进行合并(merge),然后放到工作区,相当于 fetch + merge;</li>
<li>push (推送): 修改完成后,需要和团队成员共享代码时,将代码推送到远程仓库;</li>
</ol>
<p>设置用户信息<br><code>git config --global user.name "user_name"</code><br><code>git config --global user.email "[email protected]"</code></p>
<p>查看配置信息<br><code>git config --global user.name</code><br><code>git config --global user.email</code></p>
<p>为常用命令设置别名<br>在用户目录创建 .bashrc<br><code>touch ~/.bashrc</code><br>输入如下内容</p>
<figure class="highlight bash"><table><tr><td class="code"><pre><span class="line"><span class="comment"># 用于输出 git 提交日志</span></span><br><span class="line"><span class="built_in">alias</span> git-log=<span class="string">'git log --pretty=oneline --all --graph --abbrev-commit'</span></span><br><span class="line"><span class="comment"># 用于输出当前目录所有文件及基本信息</span></span><br><span class="line"><span class="built_in">alias</span> ll=<span class="string">'ls -al'</span></span><br></pre></td></tr></table></figure>
<p>打开 git bash,执行 <code>source ~/.bashrc</code></p>
<p>解决 GitBash 乱码问题<br>打开 GitBash 执行如下命令<br><code>git config --global core.quotepath false</code><br>$(git_home)/etc/bash.bashrc 文件最后加入如下两行</p>
<figure class="highlight plaintext"><table><tr><td class="code"><pre><span class="line">export LANG="zh_CN.UTF-8"</span><br><span class="line">export LC_ALL="zh_CN.UTF-8"</span><br></pre></td></tr></table></figure>
<p>创建本地仓库<br><code>git init # 初始化当前目录为一个 git 仓库</code><br><code>ll # 初始化完成后当前目录下会多一个 .git 文件夹</code></p>
<p>基础操作命令<br>Git 工作目录下对于文件的修改(增加、删除、更新)会存在几个状态,这些修改的状态会随着执行 Git 命令而发生变化;<br><img src="/2024/04/02/%E9%BB%91%E9%A9%AC%E7%A8%8B%E5%BA%8F%E5%91%98-Git-%E6%95%99%E7%A8%8B%E7%AC%94%E8%AE%B0/image-1.png" alt="alt text"></p>
<p><code>git add</code> (工作区 –> 暂存区)<br><code>git commit</code> (暂存区 –> 本地仓库)</p>
<p>学习案例</p>
<figure class="highlight bash"><table><tr><td class="code"><pre><span class="line"><span class="built_in">touch</span> file01.txt</span><br><span class="line">git status</span><br><span class="line">git add file01.txt</span><br><span class="line">git add .</span><br><span class="line">git status</span><br><span class="line">git commit -m <span class="string">"init commit"</span></span><br><span class="line">git status</span><br><span class="line">git <span class="built_in">log</span></span><br><span class="line">code file01.txt</span><br><span class="line">git status</span><br><span class="line">git add .</span><br><span class="line">git commit -m <span class="string">"update file01.txt"</span></span><br><span class="line">git <span class="built_in">log</span></span><br></pre></td></tr></table></figure>
<p>常用命令</p>
<figure class="highlight plaintext"><table><tr><td class="code"><pre><span class="line"># 查看修改的状态(status)</span><br><span class="line"># 作用:查看修改的状态(暂存区、工作区)</span><br><span class="line"># git status</span><br><span class="line"></span><br><span class="line"># 添加工作区到暂存区(add)</span><br><span class="line"># 作用:添加工作区一个或多个文件的修改到暂存区</span><br><span class="line"># git add 单个文件名|通配符</span><br><span class="line"># git add . 将所有修改加入暂存区</span><br><span class="line"></span><br><span class="line"># 提交暂存区到本地仓库(commit)</span><br><span class="line"># 作用:提交暂存区内容到本地仓库的当前分支</span><br><span class="line"># git commit -m "注释内容"</span><br><span class="line"></span><br><span class="line"># 查看日志提交(log)</span><br><span class="line"># 查看提交记录</span><br><span class="line"># git log [option]</span><br><span class="line"># options</span><br><span class="line"> # --all 显示所有分支</span><br><span class="line"> # --pretty=oneline 将提交信息显示为一行</span><br><span class="line"> # --abbrev-commit 使得输出的 commitid 更简短</span><br><span class="line"> # --graph 以图的形式显示</span><br><span class="line"></span><br><span class="line"># 版本回退</span><br><span class="line"># 版本切换</span><br><span class="line"># git reset --hard cimmitID</span><br><span class="line"># commitID 可以使用 git log 指令查看</span><br><span class="line"># 如何查看已经删除的记录</span><br><span class="line"> # git reflog</span><br><span class="line"> # 这个命令可以查看已经删除的提交记录</span><br><span class="line"></span><br><span class="line"># 添加文件至忽略列表</span><br><span class="line"># 对于无需纳入 Git 管理的文件,可以在工作目录中创建一个名为 .gitignore 的文件,列出要忽略的文件模式;</span><br><span class="line">*.a</span><br><span class="line">!lib.a</span><br><span class="line">/TODO</span><br><span class="line">build/</span><br><span class="line">doc/*.txt</span><br><span class="line">doc/**/*.pdf </span><br></pre></td></tr></table></figure>
<p>学习案例</p>
<figure class="highlight bash"><table><tr><td class="code"><pre><span class="line"><span class="comment"># 仓库初始化</span></span><br><span class="line"><span class="comment"># 创建文件夹,并在文件夹下打开 gitbash</span></span><br><span class="line"><span class="comment"># 初始化仓库</span></span><br><span class="line">git init</span><br><span class="line"></span><br><span class="line"><span class="comment"># 创建并提交</span></span><br><span class="line"><span class="comment"># 目录下创建文件 file01.txt</span></span><br><span class="line"><span class="comment"># 将修改加入暂存区</span></span><br><span class="line">git add .</span><br><span class="line"><span class="comment"># 将修改提交到本地仓库,提交记录内存为:commit 001</span></span><br><span class="line">git commit -m <span class="string">'commit 001'</span></span><br><span class="line"><span class="comment"># 查看日志</span></span><br><span class="line">git <span class="built_in">log</span></span><br><span class="line"></span><br><span class="line"><span class="comment"># 修改文件并提交</span></span><br><span class="line"><span class="comment"># 修改 file01 的内容为: count = 1</span></span><br><span class="line"><span class="comment"># 将修改加入暂存区</span></span><br><span class="line">git add .</span><br><span class="line"><span class="comment"># 将修改提交到本地仓库,提交记录内容为:update file01</span></span><br><span class="line">git commit -m <span class="string">'update file01'</span></span><br><span class="line"><span class="comment"># 查看日志</span></span><br><span class="line">git <span class="built_in">log</span></span><br><span class="line"><span class="comment"># 以精简的方式显示提交记录</span></span><br><span class="line">git-log</span><br><span class="line"></span><br><span class="line"><span class="comment"># 将最后一次修改还原</span></span><br><span class="line"><span class="comment"># 查看提交记录</span></span><br><span class="line">git-log</span><br><span class="line"><span class="comment"># 找到倒数第 2 次提交的 commitID</span></span><br><span class="line"><span class="comment"># 版本回退</span></span><br><span class="line">git reset --hard commitID</span><br></pre></td></tr></table></figure>
<p>分支常用命令</p>
<figure class="highlight bash"><table><tr><td class="code"><pre><span class="line"><span class="comment"># 使用分支进行开发意味着开发者可以将工作从开发主线上分离开来进行重大的 Bug 修改、开发新的功能,以免影响开发主线;</span></span><br><span class="line"></span><br><span class="line"><span class="comment"># 查看本地分支</span></span><br><span class="line">git branch</span><br><span class="line"></span><br><span class="line"><span class="comment"># 创建本地分支</span></span><br><span class="line">git branch 分支名</span><br><span class="line"></span><br><span class="line"><span class="comment"># 切换分支 (checkout)</span></span><br><span class="line">git checkout 分支名</span><br><span class="line"><span class="comment"># 此外该命令还可以直接切换到一个不存在的分支(创建并切换)</span></span><br><span class="line">git checkout -b 分支名</span><br><span class="line"></span><br><span class="line"><span class="comment"># 合并分支 (merge)</span></span><br><span class="line">一个分支上的提交可以合并到另一个分支</span><br><span class="line">git merge 分支名称</span><br><span class="line"></span><br><span class="line"><span class="comment"># 删除分支</span></span><br><span class="line"><span class="comment"># 不能删除当前分支,只能删除其他分支</span></span><br><span class="line">git branch -d b1 删除分支时,需要做各种检查</span><br><span class="line">git branch -D b1 不做任何检查,强制删除</span><br><span class="line"></span><br><span class="line"><span class="comment"># 解决冲突</span></span><br><span class="line">当两个分支上对文件的修改可能会存在冲突,例如同时修改了同一个文件的同一行,这时就需要手动解决冲突,解决冲突的步骤如下:</span><br><span class="line">1. 处理文件中冲突的地方</span><br><span class="line">2. 将解决完冲突的文件加入暂存区(add)</span><br><span class="line">3. 提交到仓库(commit)</span><br><span class="line">冲突部分的内容处理如下所示:</span><br></pre></td></tr></table></figure>
<p><img src="/2024/04/02/%E9%BB%91%E9%A9%AC%E7%A8%8B%E5%BA%8F%E5%91%98-Git-%E6%95%99%E7%A8%8B%E7%AC%94%E8%AE%B0/image-2.png" alt="alt text"></p>
<p>开发中分支使用原则与流程<br>在日常开发中,一般有如下分支使用原则与流程:</p>
<ul>
<li>master (生产)分支<br> 线上分支,主分支,中小规模项目作为线上运行的应用对应的分支;</li>
<li>develop (开发)分支<br> 是从 master 创建的分支,一般作为开发部门的主要开发分支,如果没有其他并行开发不同期上线要求,都可以在此版本进行开发,阶段开发完成后,需要时合并到 master 分支,准备上线</li>
<li>feature/xxx 分支<br> 从 develop 创建的分支,一般是同期并行开发,但不同期上线时创建的分支,分支上的研发任务完成后合并到 develop 分支</li>
<li>hotfix/xxxx 分支<br> 从 master 分支派生的分支,一般作为线上 bug 修复使用,修复完成后需要合并到 master、test、develop 分支;</li>
<li>还有一些其他分支,如 test 分支(用于代码测试)、pre 分支(预上线分支)等等</li>
</ul>
<p><img src="/2024/04/02/%E9%BB%91%E9%A9%AC%E7%A8%8B%E5%BA%8F%E5%91%98-Git-%E6%95%99%E7%A8%8B%E7%AC%94%E8%AE%B0/image-3.png" alt="alt text"></p>
<p>学习案例——分支练习</p>
<figure class="highlight bash"><table><tr><td class="code"><pre><span class="line"><span class="comment"># 创建并切换到 dev01 分支,在 dev01 分支提交</span></span><br><span class="line">git branch dev01</span><br><span class="line">git checkout dev01</span><br><span class="line"><span class="comment"># 创建文件 file02.txt</span></span><br><span class="line">git add .</span><br><span class="line">git commit -m <span class="string">"add file02 on dev"</span></span><br><span class="line">git-log</span><br><span class="line"></span><br><span class="line"><span class="comment"># 切换到 master 分支,将 dev01 合并到 master 分支</span></span><br><span class="line">git checkout master</span><br><span class="line">git merge dev01</span><br><span class="line">git-log</span><br><span class="line"></span><br><span class="line"><span class="comment"># 删除 dev01 分支</span></span><br><span class="line">git branch -d dev01</span><br><span class="line">git-log</span><br></pre></td></tr></table></figure>
<p>操作远程仓库</p>
<figure class="highlight plaintext"><table><tr><td class="code"><pre><span class="line">添加远程仓库</span><br><span class="line">此操作是先初始化本地库,然后与已创建的远程库进行对接;</span><br><span class="line"># 命令:git remote add <远端名称> <仓库路径></span><br><span class="line"># 远端名称:默认是 origin,取决于远端服务器设置</span><br><span class="line"># 仓库路径:从远端服务器获取 URL</span><br><span class="line"></span><br><span class="line"># 查看远程仓库</span><br><span class="line"># 命令:git remote</span><br><span class="line"></span><br><span class="line"># 推送到远程仓库</span><br><span class="line"># 命令:git push [-f] [--set-upstream] [远端名称 [本地分支名]:[远端分支名]]</span><br><span class="line"># 如果远程分支名和本地分支名一致,则可以只写本地分支名</span><br><span class="line"> git push origin master</span><br><span class="line"># -f 表示强制覆盖</span><br><span class="line"># --set-upstream 推送到远端的同时并且建立起和远端分支的关联关系;</span><br><span class="line"> git push --set-upstream orgin master</span><br><span class="line"># 如果当前分支已经和远端分支关联,则可以省略分支名和远端名;</span><br><span class="line"> git push # 将 master 分支推送到已关联的远端分支</span><br><span class="line"></span><br><span class="line"># 本地分支与远程分支的关联关系</span><br><span class="line"># 查看关联关系可以使用 git branch -vv 命令</span><br><span class="line"></span><br><span class="line"># 从远程仓库克隆</span><br><span class="line"># 如果已经有一个远端仓库,可以直接 clone 到本地</span><br><span class="line">git clone <仓库路径> [本地目录]</span><br><span class="line"># 本地目录可以省略,会自动生成一个目录</span><br><span class="line"></span><br><span class="line"># 从远程仓库中抓取和拉取</span><br><span class="line">远程分支和本地分支一样,可以进行 merge 操作,只是需要先把远程仓库里的更新都下载到本地,再进行操作</span><br><span class="line">git fetch [remote name] [branch name]</span><br><span class="line"># 抓取指令就是将仓库里的更新都抓取到本地,不会进行合并</span><br><span class="line"># 如果不指定远端名称和分支名,则抓取所有分支</span><br><span class="line">git pull [remote name] [branch name]</span><br><span class="line"># 拉取指令就是将远端仓库的修改拉到本地并自动进行合并,等同于 fetch+merge</span><br><span class="line"># 如果不指定远端名称和分支名,则抓取所有并更新当前分支</span><br><span class="line"></span><br><span class="line"># 解决合并冲突</span><br><span class="line"># 在一段时间,A、B 用户修改了同一个文件,且修改了同一行位置的代码,此时发生合并冲突;</span><br><span class="line"># A 用户在本地修改代码后优先推送到远程仓库,此时 B 用户在本地修改代码,提交到本地仓库后,也需要推送到远程仓库,此时 B 用户晚于 A 用户,故需要先拉取远程仓库的提交,经过合并后才能推送到远端分支</span><br><span class="line"># 在 B 用户拉取代码时,因为 A、B 用户同一段时间修改了同一个文件的相同位置代码,故会发生合并冲突;</span><br><span class="line"># 远程分支也是分支,所以合并时冲突的解决方式也和解决本地分支冲突相同;</span><br></pre></td></tr></table></figure>
<p><img src="/2024/04/02/%E9%BB%91%E9%A9%AC%E7%A8%8B%E5%BA%8F%E5%91%98-Git-%E6%95%99%E7%A8%8B%E7%AC%94%E8%AE%B0/image-4.png" alt="alt text"></p>
<p><img src="/2024/04/02/%E9%BB%91%E9%A9%AC%E7%A8%8B%E5%BA%8F%E5%91%98-Git-%E6%95%99%E7%A8%8B%E7%AC%94%E8%AE%B0/image-5.png" alt="alt text"></p>
<p>学习案例——远程仓库操作</p>
<figure class="highlight plaintext"><table><tr><td class="code"><pre><span class="line"># 将本地仓库推送到远程仓库 [git_test01]</span><br><span class="line"># 添加远程仓库</span><br><span class="line">git remote add origin [email protected]/**/**.git</span><br><span class="line"># 将 master 分支推送到远程仓库,并与远程仓库的 master 分支绑定关联关系</span><br><span class="line">git push --set-upstream origin master</span><br><span class="line"></span><br><span class="line"># 将远程仓库克隆到本地 [git test02]</span><br><span class="line">git clone [email protected]/**/**.git git_test01</span><br><span class="line"># 以精简的方式显示提交记录</span><br><span class="line">git-log</span><br><span class="line"></span><br><span class="line"># 将本地修改推送到远程仓库 [git_test01]</span><br><span class="line"># 创建文件 file03.txt</span><br><span class="line"># 将修改加入暂存区并提交到仓库,提交记录内容为:add file03</span><br><span class="line">git add .</span><br><span class="line">git commit -m "add file03"</span><br><span class="line"># 将 master 分支的修改推送到远程仓库</span><br><span class="line">git push origin master</span><br><span class="line"></span><br><span class="line"># 将远程仓库的修改更新到本地 [git_test02]</span><br><span class="line"># 将远程仓库修改再拉取到本地</span><br><span class="line">git pull</span><br><span class="line"># 以精简的方式显示提交记录</span><br><span class="line">git-log</span><br><span class="line"># 查看文件变化(目录下也出现了 file03.txt)</span><br><span class="line"></span><br></pre></td></tr></table></figure>
<p><strong><font color="red">几条铁令</font></strong></p>
<ol>
<li>切换分支前先提交本地的修改</li>
<li>代码及时提交,提交过了就不会丢</li>
<li>遇到任何问题都不要删除文件目录</li>
</ol>
<h2 id="Reference"><a href="#Reference" class="headerlink" title="Reference:"></a>Reference:</h2><p>PyCharm 配置 Git:<a href="https://www.bilibili.com/video/BV1MU4y1Y7h5/?p=23&spm_id_from=pageDriver&vd_source=6164de2a185f949293fb3064a50fdb40">Click</a></p>
]]></content>
</entry>
</search>