10个必学的 Git 命令 | 10 Essential Git Commands

为什么要学 Git 命令? 虽然有很多 Git 图形界面工具,但掌握命令行操作能让你更高效、更灵活地使用 Git。 Why Learn Git Commands? While GUI tools exist, knowing the command line makes you faster and more flexible. 1. git init — 初始化仓库 在当前目录创建一个新的 Git 仓库。 ...

2026年4月25日 · 2 分钟

如何克隆 GitHub 仓库 | How to Clone a GitHub Repository

什么是克隆?| What is Cloning? 克隆(Clone)就是将 GitHub 上的远程仓库完整复制一份到你的本地电脑,包括所有文件和历史记录。 Cloning means copying a remote GitHub repository to your local machine — including all files and history. 找到仓库地址 | Find the Repository URL 打开你要克隆的 GitHub 仓库页面 点击绿色的 Code 按钮 选择 HTTPS 标签 复制地址(格式如 https://github.com/username/repo.git) 执行克隆命令 | Run the Clone Command 打开终端(Terminal / PowerShell),进入你想存放项目的目录,然后运行: ...

2026年4月24日 · 1 分钟

如何将代码推送到 GitHub | How to Push Code to GitHub

推送的完整流程 | The Full Push Workflow 将本地修改推送到 GitHub 分为三步:暂存 → 提交 → 推送 The process has three steps: Stage → Commit → Push 修改文件 → git add → git commit → git push → GitHub 第一步:查看修改状态 git status 红色文件名 = 已修改但未暂存 绿色文件名 = 已暂存待提交 ...

2026年4月23日 · 1 分钟