git 使用场景 --amend 提交

场景:--amend 提交

bash 复制代码
1. make changes to a repo and git add 

2. git commit --amend                         amend提交通常会修正并更新commit message,或者增加新的修改
3. update the existing commit message 
4. git push --force origin main               必须force push才可以,一个commit被maend之后,git认为修正之后的commit与远程仓库的commit发生了偏离,git push会直接失败
   git push -f

Further Reading :****Git常用命令汇总

相关推荐
鶴哥只手遮天4 小时前
第 8 章 工作区与检出:unpack-trees 与并行 checkout
git
xing-xing6 小时前
git 相关命令总结
git
A-刘晨阳8 小时前
GitLab + ArgoCD 实现 Kubernetes GitOps 自动化部署
运维·人工智能·git·kubernetes·自动化·云计算·argocd
ControlRookie19 小时前
SyncBridge:一个 CODESYS 工程与 AI 之间工程师级的同步工具
git·ai编程·codesys·工业软件·controlrookie
鬼手点金1 天前
opencode-性能优化建议
java·人工智能·git·自动化·nanogpt
网络毒刘1 天前
开源 Aider 工作流实战:Git 提交驱动的 AI 结对,与 Cursor 何时互补
git·ai编程·cursor·aider
HRTOS1 天前
HRTOS 4.0 将长期维护:为什么版本号不再频繁变化
经验分享·git·单片机·51单片机
驭渊的小故事2 天前
linux 基础命令 + git 仓库创建和配置命令
linux·git
行者-全栈开发2 天前
华为云码道 CodeArts 实测:让 AI 用 Rust 写一个 Git 仓库健康度体检台「仓衡」
git·rust·tauri·桌面应用·ai 编程·华为云码道·codearts 代码智能体
挖掘狂人4 天前
Git 从 0 到 1:用一个小项目走完 add / commit / reset / merge / rebase / push
git·后端·github