LoginSignup
1
2

More than 5 years have passed since last update.

[未来の自分へ]git rebase -iで困ったら

Posted at

前置き

尊敬するエンジニア先輩が未来の自分の為にドキュメントを残す、
という名言に感銘を受けたリスペクトタイトル。意味はない

内容メモ

コミットを纏めたりする際、git reabase -iを使うと思うけど検索してもいい感じなドキュメント見つからないしヘルプ見るにも一度rebase実行させないと行けないので、ヘルプ抜粋。

中身については追記するかもしれないし、しないかもしれない。

[原文]

 24 # Commands:↲
 25 # p, pick <commit> = use commit↲
 26 # r, reword <commit> = use commit, but edit the commit message↲
 27 # e, edit <commit> = use commit, but stop for amending↲
 28 # s, squash <commit> = use commit, but meld into previous commit↲
 29 # f, fixup <commit> = like "squash", but discard this commit's log message↲
 30 # x, exec <command> = run command (the rest of the line) using shell↲
 31 # d, drop <commit> = remove commit↲
 32 # l, label <label> = label current HEAD with a name↲
 33 # t, reset <label> = reset HEAD to a label↲
 34 # m, merge [-C <commit> | -c <commit>] <label> [# <oneline>]↲
 35 # .       create a merge commit using the original merge commit's↲
 36 # .       message (or the oneline, if no original merge commit was↲
 37 # .       specified). Use -c <commit> to reword the commit message.↲
 38 #↲
 39 # These lines can be re-ordered; they are executed from top to bottom.↲
 40 #↲
 41 # If you remove a line here THAT COMMIT WILL BE LOST.↲
 42 #↲
 43 #>--However, if you remove everything, the rebase will be aborted.↲
 44 #↲
 45 #>--↲
 46 # Note that empty commits are commented out↲

[google翻訳]

24#コマンド:
 25#p、pick <commit> =使用するコミット
 26#r、reword <commit> =コミットを使用するが、コミットメッセージを編集する
 27#e、edit <コミット> =コミットを使用するが、停止のために停止する
 28#s、squash <commit> =コミットを使用しますが、前のコミットにマッチします。
 29#f、fixup <commit> = "squash"と似ていますが、このコミットのログメッセージを破棄します。
 30#x、exec <コマンド> =shell↵を使用してコマンドを実行する(行の残りの部分)
 31#d、drop <コミット> =削除をコミット
 32#l、label <label> =現在のHEADにラベルを付ける
 33#t、reset <label> = HEADをラベルにリセットする
 34#m、merge [-C <commit> | -c <commit>] <label> [#<oneline>]↲
 35#。元のマージを使用してマージコミットを作成するcommit's↲
 36#。メッセージ(またはオンラインの場合、元のマージコミットがなかった場合
 37#。指定された)。コミットメッセージの単語を変更するには、-c <commit>を使用します。
 38#↲
 39#これらの行は並べ替えることができます。彼らは上から下に実行されます。
 40#↲
 41#ここで行を削除すると、コミットは失われます。
 42#↲
 43#>  - ただし、すべてを削除すると、リベースは中止されます。
 44#↲
 45#>  - ↲
 46#空のコミットがコメントアウトされていることに注意してください。
1
2
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
1
2