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

相关推荐
爱码小白18 分钟前
GIT版本控制
git
遇见火星1 小时前
Git 入门指南:从零开始掌握版本控制的魔法
git·版本控制
星际编程喵3 小时前
研发流程规范:Git Commit 书写标准
git·gitee·github·gitcode
to future_4 小时前
git超详细教程
git
GL_Rain5 小时前
pip安装git库出现ModuleNotFoundError: No module named ‘xxx‘
git·pip
大白要努力!8 小时前
Android 项目历史提交远程仓库资源过大,如何清理历史提交中无用的大文件
android·git
一点事8 小时前
git:已有主分支,创建空分支,管理项目
git
指尖跳动的光8 小时前
git 提交报 Updates were rejected because the tip of your current branch is behind
git
痕忆丶8 小时前
Git_Rebase_Conflict_Resolution
大数据·git
啃火龙果的兔子9 小时前
vscode中的git插件
git·vscode·elasticsearch