惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Google DeepMind News
Google DeepMind News
C
Cybersecurity and Infrastructure Security Agency CISA
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
T
Tailwind CSS Blog
G
GRAHAM CLULEY
博客园 - 叶小钗
T
Threatpost
小众软件
小众软件
The Hacker News
The Hacker News
博客园 - 聂微东
博客园 - 三生石上(FineUI控件)
P
Privacy & Cybersecurity Law Blog
AWS News Blog
AWS News Blog
P
Proofpoint News Feed
Jina AI
Jina AI
S
Schneier on Security
N
News | PayPal Newsroom
Help Net Security
Help Net Security
A
Arctic Wolf
T
The Blog of Author Tim Ferriss
大猫的无限游戏
大猫的无限游戏
T
Troy Hunt's Blog
美团技术团队
L
Lohrmann on Cybersecurity
The Last Watchdog
The Last Watchdog
www.infosecurity-magazine.com
www.infosecurity-magazine.com
P
Privacy International News Feed
D
Darknet – Hacking Tools, Hacker News & Cyber Security
C
Cisco Blogs
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
Hugging Face - Blog
Hugging Face - Blog
B
Blog RSS Feed
The Register - Security
The Register - Security
博客园 - Franky
Stack Overflow Blog
Stack Overflow Blog
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
S
SegmentFault 最新的问题
腾讯CDC
云风的 BLOG
云风的 BLOG
Simon Willison's Weblog
Simon Willison's Weblog
Google DeepMind News
Google DeepMind News
AI
AI
GbyAI
GbyAI
Attack and Defense Labs
Attack and Defense Labs
Cloudbric
Cloudbric
I
Intezer
The GitHub Blog
The GitHub Blog
V2EX - 技术
V2EX - 技术
Scott Helme
Scott Helme
J
Java Code Geeks

ACCB

1Panel第三方应用商店 VS Code 插件推荐 JavaScript 数组方法速查 Linux 命令行技巧 你好,欢迎
Git 常用命令备忘录
lbb · 2025-01-12 · via ACCB

整理了日常开发中最常用的 Git 命令:

基础操作

git init # 初始化仓库

git clone <url> # 克隆仓库

git status # 查看状态

git add . # 添加所有文件到暂存区

git commit -m "message" # 提交更改

git push # 推送到远程

git pull # 拉取远程更新

分支操作

git branch # 查看本地分支

git branch -r # 查看远程分支

git checkout -b <branch> # 创建并切换分支

git checkout <branch> # 切换分支

git merge <branch> # 合并分支

git branch -d <branch> # 删除分支

日志和历史

git log --oneline # 简洁日志

git log --graph # 图形化日志

git show <commit> # 查看提交详情

git diff # 查看变更

撤销操作

git checkout -- <file> # 撤销工作区修改

git reset HEAD <file> # 取消暂存

git reset --hard HEAD^ # 回退到上一版本

记住这些命令,日常开发效率翻倍!