-
Notifications
You must be signed in to change notification settings - Fork 8
answered the question about REVERT #7
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
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this 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?
There was a problem hiding this 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...
There was a problem hiding this 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!!! |
There was a problem hiding this comment.
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 ;)
I have had an attempt at answering this, but I am not really sure.