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

Episode 5 - Exploring History: Exercise Understanding Workflow and History #632

Open
kekoziar opened this issue May 6, 2019 · 0 comments

Comments

Projects
None yet
1 participant
@kekoziar
Copy link
Contributor

commented May 6, 2019

The current solution to "Understanding Workflow and History" can lead to confusion in a novice learner, especially since the last sentence "The working copy still has the second line (and git status will show that the file is modified)." makes it seem as if the current version of venus.txt has two lines in it; it does not.

This is a clearer answer:

The answer is 2.

The command git add venus.txt places the current version of venus.txt into the staging area. 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 "Comment on Venus as an unsuitable base" is executed, venus.txt committed to the repository is the version 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 checkout HEAD venus.txt replaces the working copy with the most recently committed version of venus.txt.

So, cat venus.txt will output Venus is beautiful and full of love.

@kekoziar kekoziar added the help wanted label May 6, 2019

@kekoziar kekoziar added this to the June 2019 Release milestone May 6, 2019

@kekoziar kekoziar referenced this issue May 7, 2019

Open

June 2019 Lesson Release checklist #611

7 of 12 tasks complete

kekoziar added a commit to kekoziar/git-novice that referenced this issue May 19, 2019

Update Exercise per issue swcarpentry#632
Update output for exercise **Understanding Workflow and History** per issue swcarpentry#632.
Also, corrected line lengths in the file per [Carpentries guidelines](https://carpentries.github.io/lesson-example/04-formatting/index.html).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.