I had a similar problem and I was able to create a concise commit by simply discarding and confirming the changes.
Initial layout:
* 06074985 (HEAD -> test1) Merge branch 'test2' into test1 |\ | * eb2aa088 (test2) test2 commit * | c83180c8 test1 commit |/ * b6628265 (master) base commit
Git Commands: git branch temp (so I don't lose the merge commit) git reset HEAD ~ 1 git add. git commit -m "Squash commit" git diff temp (just to make sure nothing has changed)
Final layout:
* 5e229615 (HEAD -> test1) squash commit | * 06074985 (temp) Merge branch 'test2' into test1 | |\ |/ / | * eb2aa088 (test2) test2 commit * | c83180c8 test1 commit |/ * b6628265 (master) base commit
Cemafor
source share