我知道如何從命令行執行git rebase,但是如何與官方git-gui配合使用?如何用git gui做rebase?
40
A
回答
37
這給.gitconfig
文件添加在你的home目錄中添加重訂到工具菜單命令:
[guitool "Rebase onto..."]
cmd = git rebase $REVISION
revprompt = yes
[guitool "Rebase/Continue"]
cmd = git rebase --continue
[guitool "Rebase/Skip"]
cmd = git rebase --skip
[guitool "Rebase/Abort"]
cmd = git rebase --abort
[guitool "Pull with Rebase"]
cmd = git pull --rebase
13
在git-gui
:
- 轉到
Tools -> Add
,然後輸入的自定義命令即git rebase master
。 - 選擇全局添加使此選項對所有存儲庫都顯示。 (它會將配置寫入您的
~/.gitconfig
,如@ Ted-Percival在his answer中提到的那樣)。
2
git gui
都可以使用(在git rebase
man page如上面所提到,該GitHub rebase help page或在此git rebase interactive tip article)做了rebase --interactive
時將文件添加到索引中,但不執行rebase
本身。
(除非像你所看到的,你自己定義的命令,在工具部分)
4
你可以與git gui
做一個完整的交互式轉化,完成提交選擇,重新措辭和衝突解決!除了特德波斯富街的回答,添加到您的~/.gitconfig
:
[guitool "Rebase interactive"]
cmd = EDITOR=gvim git rebase -i $REVISION
revprompt = yes
您必須使用圖形編輯器 - 老式vim
將無法正常工作,但gvim
意志。你可以使用任何gui編輯器,例如我使用nedit
。這個編輯器的一個單獨的窗口會彈出,你需要輸入任何東西時間:最初選擇的提交,重述提交信息(無論是改寫或壁球犯)等
相關問題
- 1. 我如何在git中使用git pull --rebase GUI
- 2. git rebase:解釋如何做得更好?
- 3. 如何在Windows Git Gui中做'git log'?
- 4. git rebase auto可以做git fetch嗎?
- 5. `git svn rebase` vs`git rebase trunk`
- 6. git rebase i vs git rebase --onto
- 7. git branches rebase after rebase
- 8. git rebase;如何快進
- 9. 如何反轉git rebase?
- 10. git rebase,我想我做錯了什麼
- 11. 我爲什麼要做git rebase?
- 12. git pull --rebase --ff-only會做什麼?
- 13. 當我用rebase進行git pull時,如何禁用rebase hook?
- 14. 「git rebase origin」與「git rebase origin/master」
- 15. git rebase upstream/master vs git pull --rebase upstream master
- 16. git rebase vs git rebase <upstream>
- 17. 如何正確使用git rebase?
- 18. 如何使用GitPython庫git pull rebase?
- 19. 如何用git rebase壓扁-i
- 20. 如何在egg/Emacs中做一個交互式的git rebase?
- 21. git pull VS git fetch git rebase
- 22. Git Workflow和Rebase
- 23. 替代git rebase
- 24. phpstorm git pull --rebase
- 25. git rebase after pull
- 26. Git rebase flow
- 27. 'git rebase`衝突
- 28. git rebase結果
- 29. 爲什麼在git rebase應該這樣做之後:git add?
- 30. 忘記「git rebase --continue」並做了「git commit」。怎麼修?
要CMD線(2號線),你需要添加$ REVISION,即cmd = git rebase $ REVISION。否則,謝謝!我不知道這種能力存在。 – 2014-02-18 17:01:33