<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet href="/rss-style.xsl" type="text/xsl"?><rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:version="2.0"><channel><title>NekoBlog</title><description>🌸 轻盈、优雅、纯净 —— 用文字与图片记录生活与创意 feedId:172229198194932736+userId:166528077360436224</description><link>https://nekoblog.space/</link><language>zh</language><item><title>Git 安装与推送到 GitHub</title><link>https://nekoblog.space/blog/git/</link><guid isPermaLink="true">https://nekoblog.space/blog/git/</guid><description>首次仓库构建初始化与远程推送</description><content:encoded>&lt;blockquote&gt;This rendering was automatically generated by Ryuchan Feed and may have formatting issues. For the best experience, please visit: &lt;a href=&quot;https://nekoblog.space/blog/git/&quot;&gt;https://nekoblog.space/blog/git/&lt;/a&gt;&lt;/blockquote&gt; &lt;h2&gt;一、什么是 Git？&lt;/h2&gt;
&lt;p&gt;Git 是一个分布式版本控制工具，用于管理代码历史记录，并方便与他人协作开发。&lt;/p&gt;
&lt;hr&gt;
&lt;h2&gt;二、安装 Git&lt;/h2&gt;
&lt;h3&gt;1. Windows 安装&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;打开官网：&lt;a href=&quot;https://git-scm.com/&quot;&gt;Git&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;下载 Windows 安装包&lt;/li&gt;
&lt;li&gt;双击安装，一路点击 &lt;strong&gt;Next&lt;/strong&gt; 即可&lt;/li&gt;
&lt;li&gt;安装完成后，打开终端输入：&lt;/li&gt;
&lt;/ol&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;git --version
&lt;/code&gt;&lt;/pre&gt;
&lt;hr&gt;
&lt;h2&gt;三、创建并推送新仓库到 GitHub&lt;/h2&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;git init 
git add README.md
git commit -m &amp;quot;第一次提交&amp;quot;
git branch -M main
git remote add origin https://github.com/zxy131714/demo.git
git push -u origin main
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;📌 说明：&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;git init&lt;/code&gt;：初始化仓库&lt;/li&gt;
&lt;li&gt;&lt;code&gt;git add&lt;/code&gt;：添加文件&lt;/li&gt;
&lt;li&gt;&lt;code&gt;git commit&lt;/code&gt;：提交到本地仓库&lt;/li&gt;
&lt;li&gt;&lt;code&gt;git branch -M main&lt;/code&gt;：设置主分支为 main&lt;/li&gt;
&lt;li&gt;&lt;code&gt;git remote add origin&lt;/code&gt;：绑定远程仓库&lt;/li&gt;
&lt;li&gt;&lt;code&gt;git push&lt;/code&gt;：推送到 GitHub&lt;code&gt;git push&lt;/code&gt; ：推送到 GitHub&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;h2&gt;四、推送已有本地仓库到 GitHub&lt;/h2&gt;
&lt;p&gt;如果你已经有本地项目，只需执行：&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;git remote add origin https://github.com/用户名/仓库名.git
git branch -M main
git push -u origin main
&lt;/code&gt;&lt;/pre&gt;
&lt;hr&gt;
</content:encoded><dc:creator>NekoBlog</dc:creator><pubDate>Fri, 17 Apr 2026 16:14:00 GMT</pubDate></item></channel></rss>