I'm working on a git repository which I forked from an upstream. There was a feature I wanted to implement and I created a new branch uiTests and did changes there and made a pull request.
The PR was there for a while and in the meantime there were some other PRs got merged and came conflicts. I resolved them in my fork and there were two merge commits at the end.
When I check the git log, the top of the list looks like this;
commit 70db4de884d5e4b64ef3a2c903f310c901dd68e2
Merge: ef5dfc2 5b7a827
Author: Padmal
Date: Sat May 26 18:53:33 2018 +0530
Merge branch 'CloudyPadmal-uiTest' into uiTests
commit 5b7a827763c35a3605daed6c717004700582eede
Merge: e815867 ef5dfc2
Author: Padmal
Date: Sat May 26 18:52:52 2018 +0530
Merge branch 'uiTests' of git://github.com/CloudyPadmal/pslab-android into CloudyPadmal-uiTest
commit ef5dfc2f4af7431b2bc5efa356540bd616669706
Author: Padmal
Date: Thu May 24 20:06:27 2018 +0530
test: removed Travis build time consuming UI tests
removed dummy test files
So I wanted to squash 70db4de884d5e4b64ef3a2c903f310c901dd68e2
and 5b7a827763c35a3605daed6c717004700582eede
onto ef5dfc2f4af7431b2bc5efa356540bd616669706
and update the PR with one commit.
For more information, git log --oneline
results is as follows;
70db4de Merge branch 'CloudyPadmal-uiTest' into uiTests
5b7a827 Merge branch 'uiTests' of git://github.com/CloudyPadmal/pslab-android into CloudyPadmal-uiTest
ef5dfc2 test: removed Travis build time consuming UI tests
But when I tried git rebase -i HEAD~3
, the console looks like this;
pick 9b97740 Changed Help and Feedback Activity to Fragment (#882)
pick 7e93db6 chore: Update app version (#922)
pick ca155b6 Added card view for instruments section (#884)
pick e815867 Removed AboutUs activity (#914)
pick ef5dfc2 test: removed Travis build time consuming UI tests
It doesn't show me the merge commits. For more information, following is the version log from Android Studio;
Am I following the correct method to squash these merge commits? Or is it possible to squash these commits at all? These kind of squashing merge commits been a little problem for me for a while. Thanks a lot for any help and tips! :)