VOOZH about

URL: https://qiita.com/numanomanu/items/513d62fb4a7921880085

⇱ git rebase -i を tig を使ってグラフィカルに行う #Git - Qiita


👁 Image
67

Go to list of users who liked

56

Share on X(Twitter)

Share on Facebook

Add to Hatena Bookmark

More than 5 years have passed since last update.

@numanomanu

git rebase -i を tig を使ってグラフィカルに行う

67
Last updated at Posted at 2017-09-29

git rebase -i って面倒ですよね。git rebase -i HEAD~5 など、戻るコミット数を明示する必要があります。tig を使って git rebase -i をグラフィカルにできるようにしましょう。

tig については tigでgitをもっと便利に! addやcommitも がわかりやすいです。

git rebase -i できるように ~/.tigrc に設定を追加

~/.tigrc
bind main R !git rebase -i %(commit)
bind diff R !git rebase -i %(commit)

Rはキーバインドです。自分の好きなキーを設定できます。

tig で選択した箇所で `R` を押すと `git rebase -i` が起動します。

tig 上で選択したコミットから git rebase -i してみる

feat: 修正というコミットを商品データの取得というコミットに fixup する例
👁 record6.gif

参考

もっと詳しい tig の使い方。

67

Go to list of users who liked

56
5

Go to list of comments

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
67

Go to list of users who liked

56