0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

一番最初のコミットに全コミットを集約する

Posted at

おすすめはしませんが、軽くまとめました
全コミットを1つにします

(1) 一番最初に遡ってrebaseを実行する

git rebase -i --root

(2) rebase内でエディタで置換する

viでfixupなら :%s/pick/f/g で全置換のあと、最初のコミットをfからpickに戻す

(3) 強制的にremoteを上書きする

git push origin head  --force-with-lease
# 適切に設定しているリポジトリでは不可能
# 遊びの開発用
0
0
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
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?