###### tags: `Git` # 修改wrong commit ## 不改訊息,只改檔案 方法: 1. local 端開啟git bash 2. 加入/刪減檔案 3. $git commit --amend --no-edit 此命令修改最後一次的提交,不會增加新commit,--no-edit 意思是不修改提交訊息。 4. $git push -f 強制覆寫遠端git紀錄 ## 只改訊息 1. git bash 2. $git commit --amend -m "在此處修改想要的訊息" 此命令修改最後一次的提交訊息。 3. git push -f 強制覆寫遠端git紀錄
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up