2015-11-11 30 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!