🖥
Git | Make it easy to rebase -i from the current branch root
Conclusion
Register an alias in .gitconfig
.
(With! At the beginning, write the command directly)
[alias] rbi = !git rebase -i $(git merge-base master HEAD)
Run.
$ git rbi
Result is.
pick 25cf857 Good touch the Green Green Glass pick d2057d7 Goodbye Joe he got a go me oh my oh pick 4ca967e Country load take me home
Good vibes!
(Thank you @ pasela)
problem
"Rebase from the current branch root in interactive mode" This is a messy command. Even though it is used frequently. Really troublesome.
But. It is useless to register an alias in .gitconfig.
[alias] rbi = rebase -i $(git merge-base master HEAD)
Because $(git merge-base master HEAD)
is a command.
However, it was found that shell commands can be registered by writing! At the beginning. So the solution is at the beginning.
environment
- git version 2.3.8
- Mac (OSX)
Original by
Git | 現在のブランチルートから簡単に rebase -i できるようにする
About
チャットメンバー募集
何か質問、悩み事、相談などあればLINEオープンチャットもご利用ください。
公開日時
2019-04-16
Discussion