2015-11-11 82 views
1

遠程倉庫正如標題所影響表明使用TortoiseGit對通過衍合,壁球

我想最後兩次提交擠進一個

https://github.com/dvdvideo1234/Test

並註冊到Github上遠程回購,雖然它只在本地進行更改,而不提交它們。

我正在通過日誌窗口執行此操作。右鍵點擊B,然後點擊「Rebase master on this ...」

經過這個過程,我期望遠程回購是「A,BCD」而不是我個人電腦上的本地回購。

我應該怎麼做,通過TortoiseGIT。我在Windows下正與客戶:

TortoiseGit 1.8.16.0 (C:\Program Files\TortoiseGit\bin) 
git version 1.9.5.msysgit.0 (C:\Program Files (x86)\Git\bin; C:\Program Files (x86)\Git\; C:\Program Files (x86)\Git\etc\gitconfig) 

回答

0

這metrod需要GIT慶典:

1) Save a local copy of the repo you want to squash 
2) Copy the hash of the commit where you want the head to be <NEW_HEAD_COMMIT_HASH> (for example bf426ff4a0506dae418d09c8b1551fec071e5d84) 
3) Re-base using "git push origin +<NEW_HEAD_COMMIT_HASH>:master" 
(for example "git push origin +bf426ff4a0506dae418d09c8b1551fec071e5d84:master" without the quotes) 
4) Save a local copy of the re-based repo from 3) 
5) Add the modifications from repo 1) to the one you've saved 4) 
6) Commit the changes, add one big general log. Done!