Answer to "How can I __revert__ a commit?"#11
Open
perrymant wants to merge 3 commits intoBathML:masterfrom
Open
Answer to "How can I __revert__ a commit?"#11perrymant wants to merge 3 commits intoBathML:masterfrom
perrymant wants to merge 3 commits intoBathML:masterfrom
Conversation
xavez88
reviewed
Jan 31, 2018
| - Q: How can I __revert__ a commit? | ||
|
|
||
| `$ git commit -m "Something terribly misguided" (1).` | ||
| `$ git reset HEAD~ (2).` |
Contributor
There was a problem hiding this comment.
Only surround commands by quotes, not the whole line. like git reset HEAD
kinbiko
requested changes
Jan 31, 2018
Member
kinbiko
left a comment
There was a problem hiding this comment.
Looks like you've learned a lot about reset!
|
|
||
| - Q: How can I __revert__ a commit? | ||
|
|
||
| `$ git commit -m "Something terribly misguided" (1).` |
Member
There was a problem hiding this comment.
single backticks for words or single lines
three backticks
surrounding multiple lines
for code blocks
| - Q: How can I __revert__ a commit? | ||
|
|
||
| `$ git commit -m "Something terribly misguided" (1).` | ||
| `$ git reset HEAD~ (2).` |
Member
There was a problem hiding this comment.
Strictly speaking this is a reset. A reset is a command to go back in time. a revert would be undoing a single commit - I.e. applying a commit to the end of your commit history that does the opposite of the specified commit. That is, added lines become deleted, deleted lines are added.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Can someone help me make sure that each line is actually on a new line!
Thanks,
T