Hi ,
I’ve encountered a problem when trying to squash a commit. Following the hints, I tried resetting and then entered git rebase --interactive HEAD~2
.
The git-rebase-todo
window appeared, and I replaced pick
with s
as shown below:
From
pick 0764e6f fix: add missing rename database reference
To
s 0764e6f fix: add missing rename database reference
Then, as instructed by the terminal hint, I closed the
git-rebase-todo
window. Subsequently, the COMMIT_EDITMSG
window popped up, and I clicked the tick to close it.However, despite these actions, the test still did not pass, and the hint indicated that I should use the “squash” option.
You should use the "squash" option
Below are the git log --oneline
outputs before and after the attempt:
Before
camper: /sql_reference$ git log --oneline
1cf7083 (HEAD -> fix/add-missing-rename-references) fix: add missing rename table reference
0e082fc fix: add missing rename database reference
193e3a2 (main) feat: add column references
87db07c feat: add delete row reference
a72acea feat: add update row reference
88989a2 feat: add insert row reference
d3609d2 fix: create table syntax
0ae0bd4 feat: add drop table reference
18f0344 feat: add create table reference
684afe7 feat: add drop database reference
a5de944 feat: add create database reference
a029be1 Initial commit
After
camper: /sql_reference$ git log --oneline
0764e6f (HEAD -> fix/add-missing-rename-references) fix: add missing rename database reference
193e3a2 (main) feat: add column references
87db07c feat: add delete row reference
a72acea feat: add update row reference
88989a2 feat: add insert row reference
d3609d2 fix: create table syntax
0ae0bd4 feat: add drop table reference
18f0344 feat: add create table reference
684afe7 feat: add drop database reference
a5de944 feat: add create database reference
a029be1 Initial commit
Please help.
Thank you.