Skip to content
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: Basics 4 - "A Half Commit" #253

Open
benthayer opened this issue Jul 30, 2020 · 4 comments
Open

Level: Basics 4 - "A Half Commit" #253

benthayer opened this issue Jul 30, 2020 · 4 comments
Assignees
Labels
level - educational Additional levels for the game
Milestone

Comments

@benthayer
Copy link
Owner

A level to show that the commit isn't necessarily the same as the working directory.

Start with no commits. The working directory will have a file in it, and the file will be added to the staging area, but it will have only part of the updates. The updates can be made in the next commit.

git gud status at the beginning

Working Directory
hello.txt - "Hello world"
Staging Area
hello.txt - "Hello"

git gud status at the end

Working Directory
hello.txt - "Hello world"
Staging Area
hello.txt - "Hello world"
Commit 1:
hello.txt - "Hello"
Commit 2:
hello.txt - "Hello world"

The operating system lets us check when the file was modified, so we'll have to save that information and use it when checking to see if the level has been completed. If the user edits the file at any point, the message provided by git gud test would be something like Looks like the commits are right, but we see that you've modified the file at some point during the level. Please use "git gud reset" to start over.

@benthayer benthayer added the level - educational Additional levels for the game label Jul 30, 2020
@benthayer benthayer added this to the 1.0 milestone Jul 30, 2020
@benthayer benthayer self-assigned this Aug 6, 2020
@sahansk2
Copy link
Contributor

sahansk2 commented Aug 6, 2020

@benthayer Opeop

@benthayer
Copy link
Owner Author

@sahansk2 Is it worth it to implement #284 just for this level? It doesn't seem like any other levels need #284

Either way, I think it makes sense either for you to work on #284 or for me to work on this level

@sahansk2
Copy link
Contributor

@benthayer You can take on this level, since you're already pretty familiar with how details.yaml is implemented.

@benthayer benthayer assigned benthayer and unassigned sahansk2 Aug 18, 2020
@benthayer
Copy link
Owner Author

Sounds good, updated the assignee

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
level - educational Additional levels for the game
Projects
None yet
Development

No branches or pull requests

2 participants