Add a way to undo git reset to help/git.md

This commit is contained in:
Donovan Glover 2018-02-05 23:43:21 -05:00
parent 20d6c784d0
commit 080d046282
No known key found for this signature in database
GPG Key ID: 8FC5F7D90A5D8F4D

View File

@ -6,8 +6,10 @@
- Clone a git repository from an upstream url: `git clone <url>`
- Add files to commit: `git add <files>` **OR** `ga <files>`
- Commit those files to the repository: `git commit -m <message>` **OR** `gc <message>`
- Undo the last commit: `gr`
- Undo the last commit: `gr` **OR** `git reset HEAD~`
- Undo the last soft git reset: `git reset 'HEAD@{1}'`
- Undo the last commit and delete changes: `grr`
- Also known as a "hard" git reset
- Update your local repository with a remote repository: `git pull <remote> <branch>`
- Most of the time you'll be using `origin master` to pull from your remote repository and `upstream master` to pull from the upstream repository
- This is the equivalent of clicking "accept pull request" on GitHub