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 2 - "Two Commits" #247

Closed
benthayer opened this issue Jul 29, 2020 · 1 comment · Fixed by #324
Closed

Level: Basics 2 - "Two Commits" #247

benthayer opened this issue Jul 29, 2020 · 1 comment · Fixed by #324
Assignees
Labels
level - educational Additional levels for the game
Milestone

Comments

@benthayer
Copy link
Owner

benthayer commented Jul 29, 2020

2) Two Commits - Commits are sequential - Branch updates as you commit

In this level, commits are shown to follow one another, so when you make a new commit, the old commit is still there. It also makes the differentiation between the working directory and the staging area, making the point that each of them as well as each commit is associated with a state of the directory.

Solution:
touch file1
git add file1
git commit
touch file2
git add file2
git commit

git gud status

Working Directory:
 File 1: Exists
 File 2: Exists
Staging Area:
 File 1: Exists
 File 2: Exists
Commit 1: Doesn't exist
Commit 2: Doesn't exist

Once things start getting committed, we can change to a view like this

"Initial commit":
 File 1: Exists
 File 2: Doesn't exist
"Hello world commit" (master):
 File 1: Exists
 File 2: Exists

Similarly, we can name File 1 and File 2 to according to their actual name, just like we did with commit messages

@benthayer benthayer added this to the 1.0 milestone Jul 29, 2020
@benthayer benthayer added the level - educational Additional levels for the game label Jul 29, 2020
@sahansk2
Copy link
Contributor

sahansk2 commented Aug 6, 2020

@benthayer Shoop

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

Successfully merging a pull request may close this issue.

2 participants