History & Logs
Visualizing your repository history.
gli provides enhanced visualization for Git logs, making it easier to parse history at a glance.
Git Log
A cleaner, color-coded alternative to git log.
gli -l
# or
gli --logBy default, this displays the most recent 10 commits with:
- Hash: Short commit hash.
- Date: Relative or absolute date.
- Author: Committer name.
- Message: Commit subject.
Tip
You can customize the number of commits shown by passing a number, e.g., gli -l 20.
Reflog (Recovery)
View the reference log to recover lost commits or reset states.
gli -rl
# or
gli --reflogUseful for finding the SHA before a hard reset or after a mistaken rebase.
Reset
Reset your current branch to the previous commit (HEAD~1).
Soft Reset
Keeps your changes staged. Use this to "undo" a commit but keep the work.
gli -rs soft
# or
gli --reset softHard Reset
Discards all changes and resets to the previous commit.
Warning
Data will be lost. Use this only if you are certain you want to permanently discard your uncommitted changes.
gli -rs hard
# or
gli --reset hard