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

推荐订阅源

The Register - Security
The Register - Security
T
Troy Hunt's Blog
D
Darknet – Hacking Tools, Hacker News & Cyber Security
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
C
Cybersecurity and Infrastructure Security Agency CISA
S
Securelist
G
GRAHAM CLULEY
S
Schneier on Security
S
Secure Thoughts
Know Your Adversary
Know Your Adversary
Forbes - Security
Forbes - Security
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
The Hacker News
The Hacker News
Y
Y Combinator Blog
L
LINUX DO - 最新话题
D
Docker
S
Security @ Cisco Blogs
P
Proofpoint News Feed
V
Vulnerabilities – Threatpost
博客园_首页
T
The Blog of Author Tim Ferriss
Blog — PlanetScale
Blog — PlanetScale
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
V2EX - 技术
V2EX - 技术
NISL@THU
NISL@THU
MongoDB | Blog
MongoDB | Blog
阮一峰的网络日志
阮一峰的网络日志
P
Privacy & Cybersecurity Law Blog
C
Cisco Blogs
AWS News Blog
AWS News Blog
博客园 - 司徒正美
Martin Fowler
Martin Fowler
W
WeLiveSecurity
月光博客
月光博客
博客园 - 聂微东
N
News and Events Feed by Topic
Google DeepMind News
Google DeepMind News
D
DataBreaches.Net
T
Tenable Blog
IT之家
IT之家
MyScale Blog
MyScale Blog
N
Netflix TechBlog - Medium
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
博客园 - 三生石上(FineUI控件)
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
B
Blog
量子位
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
N
News and Events Feed by Topic
Vercel News
Vercel News

博客园 - mabiao008

CC skill Mac下载免费软件遇到问题解决 CQRS 错误码code是int类型好还是String类型好 idea2025版本破解 pgsql切换当前会话的模式 java程序中增加mongodb的联合索引 文档启动脚本报错:-bash: ./app.sh: /bin/bash^M: bad interpreter: No such file or directory Milvus索引 pandoc使用 idea把unicode转为中文 idea 插件分享 java项目处理OFD文件 java项目无法读取resources目录下的文件 三种数据对象的区别 Linux环境aspose插件word转pdf中文乱码解决方案 java List报错Method threw ‘java.lang.UnsupportedOperationException‘ exception. 解决 java字段值为null,转json后不存在该字段对应的key 格式化json大文件 springboot项目启动报错Command line is too long. Shorten the command line via JAR manifest or via a classpath file and rerun. com.alibaba.excel.exception.ExcelGenerateException: Can not close IO linux的TCP端口问题 关于linux端口号 linux下生成pdf文件名遇到问题 把页面查询到的数据导出PDF文件(html中的在线表单下载为pdf文件)
idea更新代码时Merge和Rebase区别
mabiao008 · 2026-07-07 · via 博客园 - mabiao008

image

 这是 IntelliJ IDEA 中 Git 更新项目时的两个选项,它们的核心区别在于如何处理本地提交与远程更新的整合方式,分别对应 Git 的 merge 和 rebase 操作。

  • 将传入更改合并到当前分支(Merge):本质是执行 git pull --merge,它会把远程分支的最新提交“合并”进你当前的本地分支。如果本地也有新提交,Git 会创建一个“合并提交”,历史线会呈现分叉再汇合的形态。这种方式保留了完整的开发轨迹,适合多人协作时追溯“谁在何时做了什么”,但日志可能显得杂乱。
  • 在传入更改上变基当前分支(Rebase):本质是执行 git pull --rebase,它会先把你本地的提交“暂时拿走”,让当前分支“跳到”远程最新提交的位置,再把你的提交“重新贴”上去。结果是历史线变成一条直线,看起来像是你先拉取了远程更新,再提交了本地修改。这种方式历史更干净,适合个人开发或希望保持主线整洁的场景,但会重写本地提交的哈希值,若已推送到公共分支,可能引发团队协作冲突。

 什么时候使用变基?

  • 场景:仅在你个人的功能分支上,为了保持自己分支的整洁,或者在准备合并前,想把远程最新的代码“垫”在自己脚下,解决掉冲突,让自己分支看起来像是在最新代码基础上写的一样。
  • 禁忌:绝对不要在公共分支(如 devmastermain)上使用 Rebase。