Skip to content

Commit 6db9f27

Browse files
committed
[FEATURE] Move revert commands
1 parent 056e752 commit 6db9f27

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

git_cheat_sheet.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -330,15 +330,15 @@
330330
git reset HEAD
331331
git reset HEAD -- <single-file>
332332

333-
* Discard all local changes in your working directory
334-
335-
git reset --hard HEAD
336-
337333
* Discard local changes in a specific file
338334

339335
git checkout <file>
340336

341-
* Revert a commit
337+
* Discard all local changes in your working directory
338+
339+
git reset --hard HEAD
340+
341+
* Revert a commit (e.g. to revert a commit already pushed to remote)
342342

343343
git revert HEAD
344344
git revert <commit>

0 commit comments

Comments
 (0)