Search code examples
gittortoisegit

How to perform rebase (squash) using tortoisegit


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?


Solution

  • You can combine two adjacent commits using the GUI as follows. Remember not do combine commits already on the shared repository. See: Right click 2 commits