LoginSignup
5
4

More than 5 years have passed since last update.

コミットをまとめてブランチ切り直し

Posted at

PRを出すときとかに、レビュワーが見やすいようにコミットを1つにする。
自分以外使う人がいない気がする。

コマンド

# masterに移動
git branch feature/backup1
git fetch
git checkout master
# コミットを纏める
git merge --squash feature/something
git branch feature/backup2
# 新たにブランチを作り直す
git branch -D feature/something
git push origin :feature/something
git branch feature/something
git checkout feature/something
git push origin feature/something
git branch -D master
git checkout master
# backup削除
git branch -D feature/backup1
git branch -D feature/backup2

5
4
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
5
4