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常用命令汇总

相关推荐
___波子 Pro Max.12 小时前
Git Remote 仓库地址变更
git
ModestCoder_17 小时前
Git 忽略所有 `.xlsx`,但保留指定 Excel 文件的方法
git·excel
阡陌..18 小时前
202605新版git_2.54.0常用操作指令
大数据·git·elasticsearch
会笑的小熊19 小时前
VScode项目推送到git仓库
ide·git·vscode
zhangfeng113319 小时前
宝塔服务器完全可以安装 Git,进行版本管理,而且非常简单
运维·服务器·人工智能·git·编程
Bdygsl20 小时前
Git(1)—— 基本理解与使用
git
JiaWen技术圈21 小时前
增量静态再生(ISR)详解:Next.js 中的实现与应用
javascript·git·ubuntu
The Chosen One9851 天前
【Linux】深入理解Linux进程(二):进程的状态
linux·运维·服务器·开发语言·git
TimberWill1 天前
git worktree实现分支管理
git
普修罗双战士1 天前
项目设计-文章系统发布文章完整前后端设计
java·数据库·vue.js·spring boot·git·intellij-idea