[英]How to do a rebase with git gui?
將此添加到主目錄中的.gitconfig
文件中,以將重新設置命令添加到“工具”菜單中:
[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
在git-gui
:
Tools -> Add
,然后輸入自定義命令,即git rebase master
。 ~/.gitconfig
,就像@ Ted-Percival在他的回答中提到的那樣)。 您可以使用git gui
進行完整的交互式變基,並完成提交選擇,重新編寫單詞和解決沖突! 除了Ted Percival的答案外,還將其添加到您的~/.gitconfig
:
[guitool "Rebase interactive"]
cmd = EDITOR=gvim git rebase -i $REVISION
revprompt = yes
您必須使用圖形編輯器-普通的舊vim
不起作用,但gvim
可以。 您可以使用任何gui編輯器,例如使用nedit
。 每當您需要輸入內容時,都會在此編輯器的單獨窗口中彈出:最初選擇提交,重新編寫提交消息(無論是重新提交還是壓入提交)等。
在進行rebase --interactive
時,可以使用git gui
將文件添加到索引中(如git rebase
手冊頁 , GitHub rebase幫助頁面或此git rebase交互式技巧文章中所述 ),但不能自行執行rebase
。
(除非如您所見,除非您在“工具”部分中自行定義命令)
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.