-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
git-reset: add page #1088
git-reset: add page #1088
Conversation
|
||
`git reset HEAD~1` | ||
|
||
- Undo last commit and permanently delete the changes: |
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.
Maybe mention that staged changes are also discarded.
|
||
> Undo commits. Reset current HEAD to the specified state. | ||
|
||
- Undo last commit, keep the changes: |
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.
Just to be clearer about where the changes are kept, I'd be explicit and say "keep the changes in the filesystem".
@@ -0,0 +1,11 @@ | |||
# git reset | |||
|
|||
> Undo commits. Reset current HEAD to the specified state. |
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.
Git reset has two common uses: undoing commits, and unstaging changes. Both should be mentioned in the description.
I'd suggest "Undo commits or unstage changes, by resetting the current git HEAD to the specified state."
Very nice and useful command :) please take a look at the inline comments. I plan to make a PR adding the git-reset commands for unstaging changes, from notes I have collected elsewhere, so don't worry about adding those in :) |
5996019
to
7e4cb3b
Compare
Improvements made - really appreciate the feedback @waldyrious, thank you :-) |
Happy to help, @eliotsykes :) I think the page is good to merge as-is I'll propose further changes soon, to incorporate the unstaging behavior. |
👍 |
As mentioned in #1088 (comment)
As mentioned in #1088 (comment)
No description provided.