How do I change a commit message after a 'git-pull' auto-merge?

 ̄綄美尐妖づ 提交于 2019-12-03 16:33:51

git commit --amend should work in this scenario. What exactly does not work?

You can always try using git pull --rebase in order to put your commits on top of the tree. But git warns against this saying.

"This is a potentially dangerous mode of operation. It rewrites history, which does not bode well when you published that history already. Do not use this option unless you have read git-rebase(1) carefully." (http://git-scm.com/docs/git-pull)

If you are fine with eliminating the history of the merge then this is the option for you.

@{u} is a good replacement for your <the tracked remote branch>, and then you can just glue the two steps into one. Perhaps a shell script you can distribute to them, or an alias they can add to their shells.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!