Last active
February 12, 2025 14:47
-
-
Save aeinbu/dbdd2fbdee37cbb87ce0ebf36404f089 to your computer and use it in GitHub Desktop.
Revisions
-
aeinbu revised this gist
Feb 12, 2025 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -7,7 +7,7 @@ Example: ``` shell git reset --soft HEAD^ ``` # Navigating git -
aeinbu revised this gist
Feb 12, 2025 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -9,6 +9,7 @@ Example: git reset --soft HEAD^ # Navigating git Shortcuts for path-specs - `HEAD` is the current commit -
aeinbu revised this gist
Feb 12, 2025 . 1 changed file with 5 additions and 0 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -4,6 +4,11 @@ - `git reset --mixed`, any changes are left as unstaged - `git reset --hard`, any changes are discarded Example: ``` shell git reset --soft HEAD^ # Navigating git Shortcuts for path-specs - `HEAD` is the current commit -
aeinbu created this gist
Feb 12, 2025 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,11 @@ # git reset - `git reset --soft`, any changes are left as staged (or "ready to commit") - `git reset --mixed`, any changes are left as unstaged - `git reset --hard`, any changes are discarded # Navigating git Shortcuts for path-specs - `HEAD` is the current commit - `HEAD^` is the same as `HEAD~1`, meaning one commit back from current commit - `HEAD^^` is the same as `HEAD~2`, meaning two commits back from current commit