Cannot get how to perform squash rebase for the current branch. The console command would be
git rebase -i HEAD~2
and then squash as usually. But how to do the same in TGit?
Script to initialize the case
git init .
touch 1
git add 1
git commit -m "1"
touch 2
git add 2
git commit -m "2"
touch 3
git add 3
git commit -m "3"
As a result after squashing we would have 1 commit with 3 files.
Any proposals?
This works for me using TortoiseGit 1.7.12:
TortoiseGit
-> Show log
from the context menu.Rebase master onto this...
from the context menu.Force Rebase
checkbox and then right-click on the commit to choose between Pick
, Squash
, etc., or tick the Squash ALL
checkbox in your case.Start Rebase
button, which on success turns into a Commit
button, and then into a Done
button. Press all of them.Note that in your example script you would squash / fixup to the root commit, which is a special case and does not work as described above because the root commit has no parent that you could select in step 2.