Closed florianluediger closed 4 years ago
I got the same problem.
I got the same problem,too
I have solve this! You need to change both Second commit and First coommit to First commit! But i don't know why
This worked for me:
$ githug reset 45
********************************************************************************
* Githug *
********************************************************************************
resetting level
Name: rename_commit
Level: 45
Difficulty: ***
Correct the typo in the message of your first (non-root) commit.
$ git log
5fcf296 Second commit (6 seconds ago, Gary Rennie)
a67572b First coommit (6 seconds ago, Gary Rennie)
762dc5f Initial commit (6 seconds ago, Gary Rennie)
$ git rebase -i HEAD~2
[detached HEAD 0954f5d] First commit
Date: Thu May 16 08:31:01 2019 +0100
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 file1
Successfully rebased and updated refs/heads/master.
$ git log
65af35d Second commit (2 seconds ago, Gary Rennie)
0954f5d First commit (6 seconds ago, Gary Rennie)
762dc5f Initial commit (21 seconds ago, Gary Rennie)
$ githug
********************************************************************************
* Githug *
********************************************************************************
Congratulations, you have solved the level!
What git version? I'm using 2.14.1
Interesting, today I tried it again with a fresh folder for githug and now it seems to work fine. It seems like I am not able to reproduce the issue anymore.
I am using the following git version btw: 2.16.2.windows.1
I have this issue too, and with @XingDongZhe 's solution it works. git version 2.17.1 and using WSL git rebase -i HEAD~2 Then rewording only the second commit does not give a correct solution.
@XingDongZhe Your solution is great. I pass this level by changing both commit message to 'First commit'. I'm using WSL(Ubuntu) too. Git version 2.17.1. Seem like a bug?
Renaming just the second commit (i.e. NOT the first one) works for me.
EDIT: This pointed me to the issue which to me is a bug in the test. PR #276 offers a fix
As far as I can see, I have correctly solved level 45, however it does not pass the test from githug.
Steps to reproduce:
githug reset 45
git rebase --interactive HEAD^^
githug play
The output from
git log
looks like the following:I have checked the problem definition and the solution only requires the commit message to be "First commit", which it is in my case.
I have not had problems with any of the previous levels.