我有我的特性分支的歷史如下的提交:git的櫻桃挑選和重訂失敗
(git lola
shortcut described here)
[email protected]:~/projects/infoodle$ git lola
* 0c61616 (refs/stash) WIP on receipt_preview_sprint_to_finish: 3678770 progress
|\
| * 332dc8a index on receipt_preview_sprint_to_finish: 3678770 progress
|/
* 3678770 (HEAD -> receipt_preview_sprint_to_finish, origin/receipt_preview, receipt_preview, integration) progress
* ed2ca95 Merge branch 'receipt_preview' of bitbucket.org:richinnz/infoodle-web into receipt_preview
|\
| * 0743777 preview stuff
| * 03a2279 be able to ahndle both rebatable and non-rebatable
| * 1ff3d6c better sample number for preview of receipts
| * 0a0f3ed handle missing {tax receipt} replacement
| * 0ce35c9 remove language files, should not be in git
| * 5cc2b61 identify first key of transaction detail correctly to get data out of transaction record
| * def1132 sort out preview spinner
| * 5622f85 typo when pasting code from master
* | 30ef79c (origin/receipt_search, receipt_search) merge transactiontranslator back into receiptconfigurator
* | 367685c progress transferring sql into configurator
* | 84c71b1 Merge remote-tracking branch 'origin/receipt_search' into receipt_search
|\ \
| * | 149e5f0 Progress on receipt screen search/ sort/ detail
* | | e927458 processing receiptstodo query into receiptList class, process SQL where parts into ReceiptConfigurator
* | | 80c7c06 list loaded from ajax complete
* | | 99b6ed8 only use global.min when not in debug mode
* | | bf15181 rename
* | | 43fd17a re-indent
* | | 57e38a0 re-indent
* | | c4e7588 save work
| |/
|/|
* | 867c918 remove confusing commented out stuff
* | fec8c04 text tweak in phpdoc
|/
* 75a78ce fix mismatch of function parameter typing after merge
基本上我不小心合併產地/ receipt_search,我們有一個關於獲取此功能分支的計劃更改完成。
我要現在開始要提交75a78ce(在底部),並以相反的順序適用
0743777 preview stuff
03a2279 be able to ahndle both rebatable and non-rebatable
1ff3d6c better sample number for preview of receipts
0a0f3ed handle missing {tax receipt} replacement
0ce35c9 remove language files, should not be in git
5cc2b61 identify first key of transaction detail correctly to get data out of transaction record
def1132 sort out preview spinner
867c918 remove confusing commented out stuff
fec8c04 text tweak in phpdoc
到一個新的分支。
1)我曾嘗試git的櫻桃挑選:
git checkout 75a78ce
git checkout -b receipt_preview_sprint_to_finish
git cherry-pick fec8c04..0743777
應用第二次提交時,這將失敗:
On branch receipt_preview_sprint_to_finish
You are currently cherry-picking commit 867c918.
(fix conflicts and run "git cherry-pick --continue")
(use "git cherry-pick --abort" to cancel the cherry-pick operation)
Unmerged paths:
(use "git add <file>..." to mark resolution)
both modified: code/classes/class.receipting.php
我不明白爲什麼會有衝突。
2)然後我試圖變基:
git branch -f integration 0743777
git rebase --onto receipt_preview_sprint_to_finish fec8c04~1 integration
First, rewinding head to replay your work on top of it...
Fast-forwarded integration to receipt_preview_sprint_to_finish.
[email protected]:~/projects/infoodle$ git log
commit 3678770d92b2fd00797d2cda2875c090fc701a1e
Author: Jochen Daum <[email protected]>
Date: Thu Mar 23 10:48:42 2017 +1300
progress
commit ed2ca95096690c4c419ef491ad65c3c5020120e5
Merge: 30ef79c 0743777
Author: Jochen Daum <[email protected]>
Date: Thu Mar 23 08:26:23 2017 +1300
Merge branch 'receipt_preview' of bitbucket.org:richinnz/infoodle-web into receipt_preview
# Conflicts:
# code/ajax/accountcode_functions.php
# code/ajax/subinclude/person.php
# code/styles/ennz/admin_donationreceipts.tpl.php
# code/styles/ennz/header.tpl
但這些2個提交我特別不想。
我在做什麼錯?
在'櫻桃pick'命令,這真是你寫fec8c04 .0743777還是你拼寫出每個提交單獨?我認爲你必須單獨編寫它們,除非你想要一系列的提交。 –