<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Git on Ray's Blog</title><link>https://raychi.site/tags/git/</link><description>Recent content in Git on Ray's Blog</description><generator>Hugo</generator><language>zh-CN</language><copyright>Copyright © 2025, Ray</copyright><lastBuildDate>Mon, 11 Nov 2024 00:00:00 +0800</lastBuildDate><atom:link href="https://raychi.site/tags/git/index.xml" rel="self" type="application/rss+xml"/><item><title>dive-into-git</title><link>https://raychi.site/dive-into-git/</link><pubDate>Mon, 11 Nov 2024 00:00:00 +0800</pubDate><guid>https://raychi.site/dive-into-git/</guid><description>&lt;p>git，可以说既熟悉又陌生。大家日常使用可能仅限于个人开发，即使用&lt;code>git clone url&lt;/code>, &lt;code>git add .&lt;/code>, &lt;code>git commit -m 'waibiwaibi'&lt;/code>等。但是如果涉及到&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#e6edf3;background-color:#0d1117;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-bash" data-lang="bash">&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#6e7681"> 1&lt;/span>&lt;span>// 只git下来近十次的信息
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#6e7681"> 2&lt;/span>&lt;span>git clone git@github.com:duffy/example.git --depth &lt;span style="color:#a5d6ff">10&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#6e7681"> 3&lt;/span>&lt;span>// 更新分支模块
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#6e7681"> 4&lt;/span>&lt;span>git submodule update --init --recursive
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#6e7681"> 5&lt;/span>&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#6e7681"> 6&lt;/span>&lt;span>git status
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#6e7681"> 7&lt;/span>&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#6e7681"> 8&lt;/span>&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#6e7681"> 9&lt;/span>&lt;span>git config --global user.name &lt;span style="color:#a5d6ff">&amp;#34;duffy&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#6e7681">10&lt;/span>&lt;span>git config --global user.email &lt;span style="color:#a5d6ff">&amp;#34;duffy@qq.com&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>如果使用ssh连接那么就要配置密钥。
本地生成密钥，一个公钥、一个私钥。公钥存到GitHub平台上。&lt;/p></description></item></channel></rss>