プルリクエストに対してコミットがたくさんになってしまい、
「commitを1にまとめて」と言われることがあると思います。
その時は下記をの通りに実行
登場するブランチ
- 作業ブランチのマージ先
develop
- 作業ブランチ
feature/example_999
- 一時作成用ブランチ
tmp
$ git checkout feature/example_999 # 作業ブランチへ移動しておく
$ git branch -m feature/example_999 tmp # -m ブランチ名を変える
$ git checkout develop # 作業ブランチのマージ先ブランチに切り替える
$ git checkout -b feature/example_999 # 作業ブランチと同じ名前のブランチを作成
$ git merge --squash tmp # 1つにまとめる
$ git commit -m "squash" # commit
$ git push origin feature/example_999 -f # push
$ git branch -D tmp # tmpブランチを削除