Skip to content

Commit

Permalink
Site updated: 2023-10-23 22:11:50
Browse files Browse the repository at this point in the history
  • Loading branch information
lihaibineric committed Oct 23, 2023
1 parent 215e077 commit 0b266dc
Show file tree
Hide file tree
Showing 13 changed files with 1,273 additions and 23 deletions.
6 changes: 6 additions & 0 deletions 2023/10/22/conda_list/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -387,6 +387,12 @@ <h4 id="镜像源安装">镜像源安装</h4>
<article class="post-prev col-6">


<a href="/2023/10/23/git/" title="【计算机基础】Git命令集">
<i class="iconfont icon-arrowleft"></i>
<span class="hidden-mobile">【计算机基础】Git命令集</span>
<span class="visible-mobile">Previous</span>
</a>

</article>
<article class="post-next col-6">

Expand Down
2 changes: 1 addition & 1 deletion 2023/10/22/pymarl环境/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<meta property="og:image" content="https://gitee.com/lihaibineric/picgo/raw/master/pic/image-20231022153907123.png">
<meta property="og:image" content="https://gitee.com/lihaibineric/picgo/raw/master/pic/image-20231022153709693.png">
<meta property="article:published_time" content="2023-10-22T06:35:25.000Z">
<meta property="article:modified_time" content="2023-10-22T13:52:45.364Z">
<meta property="article:modified_time" content="2023-10-23T13:30:26.601Z">
<meta property="article:author" content="Haibin Li">
<meta property="article:tag" content="人工智能">
<meta property="article:tag" content="深度学习">
Expand Down
724 changes: 724 additions & 0 deletions 2023/10/23/git/index.html

Large diffs are not rendered by default.

8 changes: 7 additions & 1 deletion archives/2023/10/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -204,14 +204,20 @@


<div class="list-group">
<p class="h4">4 posts in total</p>
<p class="h4">5 posts in total</p>
<hr>




<p class="h5">2023</p>

<a href="/2023/10/23/git/" class="list-group-item list-group-item-action">
<time>10-23</time>
<div class="list-group-item-title">【计算机基础】Git命令集</div>
</a>


<a href="/2023/10/22/conda_list/" class="list-group-item list-group-item-action">
<time>10-22</time>
<div class="list-group-item-title">【计算机基础】Anaconda命令集</div>
Expand Down
8 changes: 7 additions & 1 deletion archives/2023/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -204,14 +204,20 @@


<div class="list-group">
<p class="h4">4 posts in total</p>
<p class="h4">5 posts in total</p>
<hr>




<p class="h5">2023</p>

<a href="/2023/10/23/git/" class="list-group-item list-group-item-action">
<time>10-23</time>
<div class="list-group-item-title">【计算机基础】Git命令集</div>
</a>


<a href="/2023/10/22/conda_list/" class="list-group-item list-group-item-action">
<time>10-22</time>
<div class="list-group-item-title">【计算机基础】Anaconda命令集</div>
Expand Down
8 changes: 7 additions & 1 deletion archives/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -204,14 +204,20 @@


<div class="list-group">
<p class="h4">4 posts in total</p>
<p class="h4">5 posts in total</p>
<hr>




<p class="h5">2023</p>

<a href="/2023/10/23/git/" class="list-group-item list-group-item-action">
<time>10-23</time>
<div class="list-group-item-title">【计算机基础】Git命令集</div>
</a>


<a href="/2023/10/22/conda_list/" class="list-group-item list-group-item-action">
<time>10-22</time>
<div class="list-group-item-title">【计算机基础】Anaconda命令集</div>
Expand Down
43 changes: 26 additions & 17 deletions categories/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -215,22 +215,22 @@

<div class="category row nomargin-x">
<a class="category-item collapsed
list-group-item category-item-action col-10 col-md-11 col-xm-11" title="人工智能"
id="heading-f068f0dad74789bee210163c40a4b50d" role="tab" data-toggle="collapse" href="#collapse-f068f0dad74789bee210163c40a4b50d"
list-group-item category-item-action col-10 col-md-11 col-xm-11" title="计算机基础"
id="heading-5a596b42154341fee9d0bdf28baa6524" role="tab" data-toggle="collapse" href="#collapse-5a596b42154341fee9d0bdf28baa6524"
aria-expanded="false"
>
人工智能
计算机基础
<span class="list-group-count"></span>
<i class="iconfont icon-arrowright"></i>
</a>

<a href="/categories/%E4%BA%BA%E5%B7%A5%E6%99%BA%E8%83%BD/" class="category-count col-2 col-md-1 col-xm-1">
<a href="/categories/%E8%AE%A1%E7%AE%97%E6%9C%BA%E5%9F%BA%E7%A1%80/" class="category-count col-2 col-md-1 col-xm-1">
<i class="iconfont icon-articles"></i>
<span>1</span>
<span>2</span>
</a>

<div class="category-collapse collapse " id="collapse-f068f0dad74789bee210163c40a4b50d"
role="tabpanel" aria-labelledby="heading-f068f0dad74789bee210163c40a4b50d">
<div class="category-collapse collapse " id="collapse-5a596b42154341fee9d0bdf28baa6524"
role="tabpanel" aria-labelledby="heading-5a596b42154341fee9d0bdf28baa6524">



Expand All @@ -239,10 +239,19 @@



<a href="/2023/10/21/RSS-Model/" title="自动驾驶】RSS Model for Autonomous Driving"
<a href="/2023/10/23/git/" title="计算机基础】Git命令集"
class="list-group-item list-group-item-action
">
<span class="category-post">【自动驾驶】RSS Model for Autonomous Driving</span>
<span class="category-post">【计算机基础】Git命令集</span>
</a>




<a href="/2023/10/22/conda_list/" title="【计算机基础】Anaconda命令集"
class="list-group-item list-group-item-action
">
<span class="category-post">【计算机基础】Anaconda命令集</span>
</a>


Expand All @@ -257,22 +266,22 @@

<div class="category row nomargin-x">
<a class="category-item collapsed
list-group-item category-item-action col-10 col-md-11 col-xm-11" title="计算机基础"
id="heading-5a596b42154341fee9d0bdf28baa6524" role="tab" data-toggle="collapse" href="#collapse-5a596b42154341fee9d0bdf28baa6524"
list-group-item category-item-action col-10 col-md-11 col-xm-11" title="人工智能"
id="heading-f068f0dad74789bee210163c40a4b50d" role="tab" data-toggle="collapse" href="#collapse-f068f0dad74789bee210163c40a4b50d"
aria-expanded="false"
>
计算机基础
人工智能
<span class="list-group-count"></span>
<i class="iconfont icon-arrowright"></i>
</a>

<a href="/categories/%E8%AE%A1%E7%AE%97%E6%9C%BA%E5%9F%BA%E7%A1%80/" class="category-count col-2 col-md-1 col-xm-1">
<a href="/categories/%E4%BA%BA%E5%B7%A5%E6%99%BA%E8%83%BD/" class="category-count col-2 col-md-1 col-xm-1">
<i class="iconfont icon-articles"></i>
<span>1</span>
</a>

<div class="category-collapse collapse " id="collapse-5a596b42154341fee9d0bdf28baa6524"
role="tabpanel" aria-labelledby="heading-5a596b42154341fee9d0bdf28baa6524">
<div class="category-collapse collapse " id="collapse-f068f0dad74789bee210163c40a4b50d"
role="tabpanel" aria-labelledby="heading-f068f0dad74789bee210163c40a4b50d">



Expand All @@ -281,10 +290,10 @@



<a href="/2023/10/22/conda_list/" title="计算机基础】Anaconda命令集"
<a href="/2023/10/21/RSS-Model/" title="自动驾驶】RSS Model for Autonomous Driving"
class="list-group-item list-group-item-action
">
<span class="category-post">计算机基础】Anaconda命令集</span>
<span class="category-post">自动驾驶】RSS Model for Autonomous Driving</span>
</a>


Expand Down
8 changes: 7 additions & 1 deletion categories/计算机基础/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -204,14 +204,20 @@


<div class="list-group">
<p class="h4">1 posts in total</p>
<p class="h4">2 posts in total</p>
<hr>




<p class="h5">2023</p>

<a href="/2023/10/23/git/" class="list-group-item list-group-item-action">
<time>10-23</time>
<div class="list-group-item-title">【计算机基础】Git命令集</div>
</a>


<a href="/2023/10/22/conda_list/" class="list-group-item list-group-item-action">
<time>10-22</time>
<div class="list-group-item-title">【计算机基础】Anaconda命令集</div>
Expand Down
61 changes: 61 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,67 @@



<div class="row mx-auto index-card">


<article class="col-12 col-md-12 mx-auto index-info">
<h2 class="index-header">

<a href="/2023/10/23/git/" target="_self">
【计算机基础】Git命令集
</a>
</h2>


<a class="index-excerpt index-excerpt__noimg" href="/2023/10/23/git/" target="_self">
<div>
Git 是一个版本控制系统,是任何软件开发项目中的主要内容。通常有两个主要用途:代码备份和代码版本控制。使用Git可以逐步处理代码,在需要回滚到备份副本的过程中保存每一步的进度。 Git的安装与配置 Git的基本控制 初始化Git仓库 当完成上述的配置之后,就能开始初始化Git仓库,进入需要创建工作区的文件夹 12cd workspacegit init 创建一个名为 .git 的新子目录(该目
</div>
</a>

<div class="index-btm post-metas">

<div class="post-meta mr-3">
<i class="iconfont icon-date"></i>
<time datetime="2023-10-23 21:28" pubdate>
2023-10-23
</time>
</div>


<div class="post-meta mr-3 d-flex align-items-center">
<i class="iconfont icon-category"></i>


<span class="category-chains">



<span class="category-chain">

<a href="/categories/%E8%AE%A1%E7%AE%97%E6%9C%BA%E5%9F%BA%E7%A1%80/" class="category-chain-item">计算机基础</a>



</span>


</span>

</div>


<div class="post-meta">
<i class="iconfont icon-tags"></i>

<a href="/tags/%E5%90%8E%E7%AB%AF%E5%BC%80%E5%8F%91/">#后端开发</a>

</div>

</div>
</article>
</div>

<div class="row mx-auto index-card">


Expand Down
25 changes: 25 additions & 0 deletions local-search.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,31 @@



<entry>
<title>【计算机基础】Git命令集</title>
<link href="/2023/10/23/git/"/>
<url>/2023/10/23/git/</url>

<content type="html"><![CDATA[<meta name="referrer" content="no-referrer"/><p>Git是一个版本控制系统,是任何软件开发项目中的主要内容。通常有两个主要用途:代码备份和代码版本控制。使用Git可以逐步处理代码,在需要回滚到备份副本的过程中保存每一步的进度。</p><h2 id="git的安装与配置">Git的安装与配置</h2><h2 id="git的基本控制">Git的基本控制</h2><h4 id="初始化git仓库">初始化Git仓库</h4><p>当完成上述的配置之后,就能开始初始化Git仓库,进入需要创建<strong>工作区</strong>的文件夹</p><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><code class="hljs bash"><span class="hljs-built_in">cd</span> workspace<br>git init<br></code></pre></td></tr></table></figure><p>创建一个名为 .git的新子目录(该目录为隐藏的),其中包含所有必需的存储库文件(Git存储库框架);注意区分<strong>工作区</strong>和<strong>暂存区</strong>,在没有add之前我们都是在<strong>工作区</strong></p><p>【Vscode】考虑Git graph插件来可视化git分支目录的全貌</p><h4 id="添加文件和备注">添加文件和备注</h4><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><code class="hljs bash">git add . <br>git add &lt;file&gt;<br></code></pre></td></tr></table></figure><p>执行上述命令之后将会将当前的file或者是工作区中的所有文件都上传到暂存区</p><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><code class="hljs bash">git commit -m<span class="hljs-string">&quot;【test】XXX更改信息提示&quot;</span><br><span class="hljs-comment">#如果多次提交想覆盖到同一个提交的备注上执行下面</span><br>git commit --amend<br></code></pre></td></tr></table></figure><p>上述的命令是将本次的提交添加描述,分布式协作的时候能看清</p><h4 id="状态与日志">状态与日志</h4><p>查看默认配置</p><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs bash">git config --list<br></code></pre></td></tr></table></figure><p>查看当前所在的分支位置信息</p><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs bash">git status<br></code></pre></td></tr></table></figure><p>查看当前分支下的更改日志</p><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs bash">git <span class="hljs-built_in">log</span><br></code></pre></td></tr></table></figure><h4 id="推送与拉取">推送与拉取</h4><p>将本地暂存区中的更改内容推送到远端</p><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><code class="hljs bash">git push<br>git push -f <span class="hljs-comment">#强行推出</span><br></code></pre></td></tr></table></figure><p>将远端所在的分支内容拉到本地</p><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs bash">git pull<br></code></pre></td></tr></table></figure><p>更新所在分支的最新内容</p><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs bash">git fetch --all <br></code></pre></td></tr></table></figure><h4 id="复制分支">复制分支</h4><p>获取git连接git@ XXX.git之后执行:</p><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs bash">git <span class="hljs-built_in">clone</span> git@ XXX.git<br></code></pre></td></tr></table></figure><p>如果觉得git的内容太大,可以选择内部的分支进行下载</p><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs bash">git <span class="hljs-built_in">clone</span> -b feature/xxx git@ XXX.git<br></code></pre></td></tr></table></figure><p>feature/xxx为具体的分支内容</p><h4 id="分支操作">分支操作</h4><p>查看分支</p><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><code class="hljs bash">git branch -a <span class="hljs-comment">#查看所有的分支</span><br>git branch -r <span class="hljs-comment">#查看远端的分支</span><br></code></pre></td></tr></table></figure><p>切换不同的分支</p><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs bash">git checkout [branch] <span class="hljs-comment">#切换到分支</span><br></code></pre></td></tr></table></figure><p>创建新的分支</p><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs bash">git branch [branch] <span class="hljs-comment">#创建新的分支</span><br></code></pre></td></tr></table></figure><p>创建新的分支并切换到上面</p><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><code class="hljs bash">git checkout -b [branch] <span class="hljs-comment">#创建并切换新的分支</span><br></code></pre></td></tr></table></figure><h4 id="分支冲突">分支冲突</h4><p><strong>问题描述:</strong>如果当前修改的版本基于旧版,但是远端已经是新版origin/master,<strong>此时修改基于的内容和远端不同不能强行推</strong>。</p><p><strong>解决方法1:</strong>通过换基的方法解决,通过将当前的修改的旧版换到最新的基上</p><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br></pre></td><td class="code"><pre><code class="hljs bash"><span class="hljs-comment">#先将文件提交到暂存区</span><br>git add . <span class="hljs-comment">#保存在暂存区</span><br>git commit -m <span class="hljs-string">&quot;XXX&quot;</span><br><span class="hljs-comment">#进行换基操作</span><br>git rebase -i origin/master<br><span class="hljs-comment">#再次提交</span><br>git add .<br><span class="hljs-comment">#继续换基</span><br>git rebase --<span class="hljs-built_in">continue</span><br><span class="hljs-comment">#换基成功后,只需要一次备注(覆盖)</span><br>git commit --amend<br><span class="hljs-comment">#最后退出</span><br>git push<br>git push -f <span class="hljs-comment">#或者强行推出</span><br></code></pre></td></tr></table></figure><p><strong>解决方法2:</strong> 暴力覆盖</p><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><code class="hljs bash">git fetch --all <span class="hljs-comment">#获取远端的全部内容</span><br>git reset --hard origin/master <span class="hljs-comment">#强行将远端的内容覆盖到本地的文件中</span><br>git commit --amend <br>git push -f <span class="hljs-comment">#强行推出</span><br><br></code></pre></td></tr></table></figure>]]></content>


<categories>

<category>计算机基础</category>

</categories>


<tags>

<tag>后端开发</tag>

</tags>

</entry>



<entry>
<title>【计算机基础】Anaconda命令集</title>
<link href="/2023/10/22/conda_list/"/>
Expand Down
Loading

0 comments on commit 0b266dc

Please sign in to comment.