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

Lesson 5: No solution listed for “Reverting a Commit” exercise #603

Open
chennesy opened this issue Mar 25, 2019 · 0 comments

Comments

Projects
None yet
1 participant
@chennesy
Copy link

commented Mar 25, 2019

The Reverting a Commit exercise in the Exploring History section does not currently have a Solution section. This exercise is a fill-in-the-blank question, and some students might guess any number of incorrect answers based on commands learned during the lesson above (git diff, git status). It would be helpful, then, to provide a solution along with a brief explanation. Here’s a proposed solution:

Jennifer could look at the project’s history of commits, including full identifiers with:
git log

For a shorter list, with short identifiers for each commit, she could use:
git log --oneline

If Jennifer is sure her last commit to the repository was the most recent commit by the group, she could also find the commit identifier by looking at the repository’s HEAD:
git show HEAD

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.