You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the challenge callout Understanding workflow and history the Solution says:
The answer is 2.
The changes to the file from the second echo command are only applied to the working copy, The command git add ketchup.md places the current version of ketchup.md into the staging area. not the version in the staging area.
So, when git commit -m "My opinions about the red sauce" is executed, the version of ketchup.md committed to the repository is the one from the staging area and has only one line.
At this time, the working copy still has the second line (and
git status will show that the file is modified). However, git restore ketchup.md replaces the working copy with the most recently committed version of ketchup.md. So, cat ketchup.md will output
It looks like the first and second lines have been muddled, perhaps it should say:
The answer is 2.
The changes to the file from the second `echo` command are only applied to the working copy,
not the version in the staging area.
So, when `git commit -m "My opinions about the red sauce"` is executed,
the version of `ketchup.md` committed to the repository is the one from the staging area and
only has one line, `I like tomatoes, therefore I like ketchup`.
At this time, the working copy still has the second line (and
`git status` will show that the file is modified).
However, `git restore ketchup.md`
removes all unstaged modifications to the `ketchup.md` file, so the second line is removed.
So, `cat ketchup.md` will output
The text was updated successfully, but these errors were encountered:
astroDimitrios
changed the title
Understanding Workflow and History Incorrect Text
Fix incorrect text in Understanding Workflow and History solution in episode 5
Nov 5, 2024
What is the problem?
In the challenge callout Understanding workflow and history the Solution says:
It looks like the first and second lines have been muddled, perhaps it should say:
Location of problem (optional)
https://swcarpentry.github.io/git-novice/05-history.html
The text was updated successfully, but these errors were encountered: