Github
One minute to read
git push -f origin ブランチ名:ブランチ名 強制的にコミットを消すので履歴が残らないので注意する リモートブランチを削除する [#u69dcc0c]
↓下記のように修正する
pick 5fed676 2 squash e4b4071 9
:wqで保存すると再度エディタがあがってくるので、いい感じのコミットメッセージに修正する 2と9を一緒にした
[detached HEAD d6b273a] 2と9を一緒にした Date: Tue Jul 5 19:39:00 2016 +0900 1 file changed, 1 insertion(+), 1 deletion(-) Successfully rebased and updated refs/heads/master.
$ git log –oneline d6b273a 2と9を一緒にした b58707a 1st commit $ git push -f -u origin ブランチ名 各コマンドは以下の通り [#lbd7b250]