Skip to content

Conversation

cranbim
Copy link

@cranbim cranbim commented Jan 31, 2018

I have had an attempt at answering this, but I am not really sure.

Copy link

@chrismuris chrismuris left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks like the correct answer! (?) Could you put the git commands in , like git revert HEAD, to make it look like code?

Copy link

@chrismuris chrismuris left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. I'm approving...

Copy link

@chrismuris chrismuris left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving this change.

@@ -25,6 +25,7 @@ If you have any other questions not listed here, please raise a PR to have it ad
- Q: How can I `add` only parts of a file I've changed?

- Q: How can I __revert__ a commit?
It looks like ```git revert HEAD``` will undo the last commit but then commit the last changes as a new commit. The previous commits (both before and after the last commit) are still in the history. I think!!!
Copy link
Member

@kinbiko kinbiko Jan 31, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

correct! How would you revert a specific commit? Hint: HEAD is another word for the most recent commit, and the answer contains a hash ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants