-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Level: The Truth #277
base: main
Are you sure you want to change the base?
Level: The Truth #277
Conversation
@sahansk2 How do you like the level? |
Level looks pretty good! I was just thinking that maybe we should output
at the end of the goal text when the level is loaded. I actually tried to go about this level without running I'm making a proper review right now, but it's just this comment for now. I'm guessing that this level isn't complete yet, right? Running through the level (without running
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good stuff -- I just pointed out some things that I think need attention.
In comes the concept of the 'detached HEAD' state. Simply use "git checkout <commit_hash>" to modify HEAD so that it points to the commit instead of the branch. | ||
>>> | ||
As you've seen, a commit hash is a unique identifier for a commit. | ||
Use "git log" or "git gud status" to see the commit tree and to look for the hashes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should also mention git gud show tree
Just pushed. I'm thinking that it's not worth running git gud show-tree or git gud explain because they'll already be accustomed to running git gud explain, and git gud show-tree isn't specifically useful for this level. They can just run git log and get the same information. We can always see what the users say after we merge |
@sahansk2 Can you review this again? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Everything looks okay, but the level isn't working for me. Am I solving this wrong?
sahan@sahan-Lenovo-YOGA-C930-ubuntu:test$ git gud reset
Just like last level, make the log messages form the sentence "This is an easy level"
This time, instead of rebasing, detach HEAD using git checkout then use git cherry-pick.
Save your changes on a new branch named whatever you want, but don't check it out.
<<<<<<< Simulating: git log --reverse --oneline
8c8de00 This
e85da6a easy
b36acb6 an
3f7b140 is
fca0611 (HEAD -> master) level
=======
sahan@sahan-Lenovo-YOGA-C930-ubuntu:test$ git checkout 8c8d
Note: switching to '8c8d'.
You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 8c8de00 This
sahan@sahan-Lenovo-YOGA-C930-ubuntu:test$ git cherry-pick 3f7b
[detached HEAD f4b9f9d] is
Author: Git Gud <[email protected]>
Date: Fri Aug 14 18:06:49 2020 -0400
1 file changed, 1 insertion(+)
create mode 100644 is.txt
sahan@sahan-Lenovo-YOGA-C930-ubuntu:test$ git cherry-pick b36a
[detached HEAD 219197c] an
Author: Git Gud <[email protected]>
Date: Fri Aug 14 18:06:48 2020 -0400
1 file changed, 1 insertion(+)
create mode 100644 an.txt
sahan@sahan-Lenovo-YOGA-C930-ubuntu:test$ git cherry-pick e85d
[detached HEAD e9e7033] easy
Author: Git Gud <[email protected]>
Date: Fri Aug 14 18:06:47 2020 -0400
1 file changed, 1 insertion(+)
create mode 100644 easy.txt
sahan@sahan-Lenovo-YOGA-C930-ubuntu:test$ git cherry-pick fac0
fatal: bad revision 'fac0'
sahan@sahan-Lenovo-YOGA-C930-ubuntu:test$ git cherry-pick fca0
[detached HEAD 3fdca3d] level
Author: Git Gud <[email protected]>
Date: Fri Aug 14 18:06:50 2020 -0400
1 file changed, 1 insertion(+)
create mode 100644 level.txt
sahan@sahan-Lenovo-YOGA-C930-ubuntu:test$ glog
* 3fdca3d (HEAD) level
* e9e7033 easy
* 219197c an
* f4b9f9d is
* 8c8de00 This
sahan@sahan-Lenovo-YOGA-C930-ubuntu:test$ gloga
* 3fdca3d (HEAD) level
* e9e7033 easy
* 219197c an
* f4b9f9d is
| * fca0611 (master) level
| * 3f7b140 is
| * b36acb6 an
| * e85da6a easy
|/
* 8c8de00 This
sahan@sahan-Lenovo-YOGA-C930-ubuntu:test$ git branch mysolution
sahan@sahan-Lenovo-YOGA-C930-ubuntu:test$ gloga
* 3fdca3d (HEAD, mysolution) level
* e9e7033 easy
* 219197c an
* f4b9f9d is
| * fca0611 (master) level
| * 3f7b140 is
| * b36acb6 an
| * e85da6a easy
|/
* 8c8de00 This
sahan@sahan-Lenovo-YOGA-C930-ubuntu:test$ git gud test
Level not complete, keep trying. "git gud reset" to start from scratch.
sahan@sahan-Lenovo-YOGA-C930-ubuntu:test$ git gud goal
Just like last level, make the log messages form the sentence "This is an easy level"
This time, instead of rebasing, detach HEAD using git checkout then use git cherry-pick.
Save your changes on a new branch named whatever you want, but don't check it out.
sahan@sahan-Lenovo-YOGA-C930-ubuntu:test$ git gud status
<<<<<<< Simulating: git log --reverse --oneline
8c8de00 This
f4b9f9d is
219197c an
e9e7033 easy
3fdca3d (HEAD, mysolution) level
=======
sahan@sahan-Lenovo-YOGA-C930-ubuntu:test$
The description of the level doesn't match the testing. I don't believe we check to see if another branch is created |
@sahansk2 I'm gonna throw the ball in your court here since I made updates after your comment |
fixes #262
I changed the layout of the level so you have to detach HEAD, which will be the first time the user has done so. This makes the existing
rampup detaching
obsolete (and removed), which is fine because the explanation is weaved into this level.Explanation is obviously incredibly long, but I'm not sure how much it can be shortened without reducing content. It might be worth splitting up the level? I think user tests (post-merge) would be the best.
Also, there are files from the easy level there, but that's how this level was started, and we don't want git to think they got removed, so that's fine.