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

相关推荐
摆烂z5 小时前
AI同时完成多个功能(Git WorkTree)
git
___波子 Pro Max.10 小时前
Git Worktree 可视化理解指南
git
happymaker062611 小时前
git使用快速入门
git
不做超级小白12 小时前
从零到可用:在手机上用 Termux + Git + Obsidian 打造稳定同步环境(踩坑全记录)
git·智能手机
凡客丶12 小时前
Git安装与使用保姆教程【超详细】
git
android_cai_niao12 小时前
给Git项目添加多个远程仓库
git·gitee·github
胡小禾12 小时前
多账号下git自动切号
git
zhensherlock12 小时前
Protocol Launcher 系列:Working Copy 提交与同步全攻略
javascript·git·typescript·node.js·自动化·github·js
前端若水12 小时前
Git 全命令超级详细指南
大数据·git·elasticsearch
SiYuanFeng1 天前
新手学Git:如何把本地 Git 项目上传到 GitHub
git·github