git-gud icon indicating copy to clipboard operation
git-gud copied to clipboard

Level: Basics 4 - "A Half Commit"

Open benthayer opened this issue 4 years ago • 4 comments

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 avatar Jul 30 '20 22:07 benthayer

@benthayer Opeop

sahansk2 avatar Aug 06 '20 20:08 sahansk2

@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

benthayer avatar Aug 14 '20 23:08 benthayer

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

sahansk2 avatar Aug 17 '20 23:08 sahansk2

Sounds good, updated the assignee

benthayer avatar Aug 18 '20 00:08 benthayer