[英]Git, rebasing an incorrectly branched branch
git clone blah
git checkout -b development
git checkout -b bug581
hack hack
git checkout -b bug588
hack hack
哦等等,bug 588應該從開發中萌芽,而不是581。
git rebase --onto development bug581 bug588
給我:
Cannot rebase: You have unstaged changes.
Please commit or stash them.
呃,但我不呢? git status顯示工作目錄是干凈的。 所以讓我們只是為了咯咯笑。
git stash
git rebase --onto development bug581 bug588
好吧現在它有效,但它拉動了581和588的歷史,我只想要588的歷史,而不是581的歷史。
我在Mac上,這個模糊的配置更改似乎解決了我沒有關於無階段更改的困境。
git config --global core.trustctime false
我認為這與Windows文件時間,linux文件時間和mac文件時間之間的差異有關。 誰知道,如果你這樣做,請隨時發表評論。
你有自動rebase打開?
查看〜/ .gitconfig或.git / config
[branch "master"] rebase = true
要么
[branch] autosetuprebase = always
第二次執行“hack hack”,是您的非分段更改發生的位置。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.