Hatica
hatica.io › blog › git-log-cheatsheet
Git Log Cheatsheet For a Productive 2024 - Hatica
April 24, 2023 - Git provides several options to limit the output of the log command. One of the most useful options is the "--since" option. This option allows you to specify a date and time to start the log output.
A Beginner's Guide to Git: A Comprehensive Cheatsheet of Common Commands
Once you have your bearings with Git, some additional commands to learn: $ git rebase $ git reflog $ git cherry-pick $ git reset $ git bisect $ git log -p $ git log -S $ git format-patch $ git apply --check $ git am I would not call these advanced commands, although they are intermediate ones, because they do require some working knowledge of Git. More on reddit.com
I made a Git cheat sheet to help learn the commands. Suggestions are welcome.
Great work! Nice design and amazing organization visually. Would you consider adding git clean and git bisect? Some ways of filtering git log? git log --oneline --graph --all is a command I use a lot. More on reddit.com
Magit tutorial?
Open magit by pressing SPC g s (you can remember it as git status).
First of all: Pressing ? will give you a cheat sheet of the commands you can run. That should help you with most normal flows, but here’s a little cheat sheet:
j/k
navigate up and down
TAB
on a file: expand/collapse diff
b b
checkout a branch
b c
create a branch
f p
fetch from remote*
F p
pull from remote*
P p
push to remote*
s
on a file: stage changes
u
on a file: unstage changes
x
on a file: discard changes
c c
commit staged changes (opens buffer for commit message, commit by pressing , c)
* = You can choose upstream (u) or another repo/branch (e) instead of your remote (p).
Almost all of the above is default in Magit and is not unique to evil or Spacemacs. I would recommend checking the Magit manual which goes into more depth.
More on reddit.comMy favorite alias for git log
[alias] lg = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr)%Creset' --abbrev-commit --date=relative More on reddit.com
What is Git Log?
Git log is a command in Git that displays the commit history of a repository, including details such as author, date, and commit message.
hatica.io
hatica.io › blog › git-log-cheatsheet
Git Log Cheatsheet For a Productive 2024 - Hatica
How to see Git Logs?
Navigate to your Git repository in the terminal, and run git log -n to view the commit history and understand the changes made over time.
hatica.io
hatica.io › blog › git-log-cheatsheet
Git Log Cheatsheet For a Productive 2024 - Hatica
Videos
07:21
8. Git Log made easy! - YouTube
07:55
Git commands - git log command explained - YouTube
08:35
git log command in terminal examples - YouTube
03:08
Git Log Explained: A Beginner's Guide to Viewing Commit History ...
01:13
Common Git Log Options - YouTube
07:24
Git for QA Testers #6 | Git Log Tutorial | View Commit History ...
Git
git-scm.com › docs › git-log
Git - git-log Documentation
Using more options generally further limits the output (e.g. --since=<date1> limits to commits newer than <date1>, and using it with --grep=<pattern> further limits to commits whose log message has a line that matches <pattern>), unless otherwise noted.
Elijah Manor
elijahmanor.com › blog › git-log
Git Log Cheatsheet
September 28, 2020 - # Logs in Current Branch git log # Logs last n number of commits git log -n 5 # Commits between branch1 and branch2 git log branch1..branch2 # Commits in branch1 that are not in branch2 git log branch1 ^branch2 · There are a couple of different ways you can figure out what changed in git ... See a list of commits ands changes for a particular file over its history. ... The following will show statistics about commits and show the patch information as well. ... Sometimes you may need to quickly find a specific commit by message or by the content contained in the commit. ... You could redirect the output of git log --online to grep and search for a commit message that way.
Git
git-scm.com › cheat-sheet
Git Cheat Sheet
The entire Pro Git book written by Scott Chacon and Ben Straub is available to read online for free. Dead tree versions are available on Amazon.com · Every time we say <commit>, you can use any of these:
Git
git-scm.com › book › en › v2 › Git-Basics-Viewing-the-Commit-History
2.3 Git Basics - Viewing the Commit History
For example, if you want to see some abbreviated stats for each commit, you can use the --stat option: $ git log --stat commit ca82a6dff817ec66f44342007202690a93763949 Author: Scott Chacon <schacon@gee-mail.com> Date: Mon Mar 17 21:52:11 2008 -0700 Change version number Rakefile | 2 +- 1 file ...
Atlassian
atlassian.com › git › tutorials › git-log
Advanced Git Log | Atlassian Git Tutorial
January 12, 2026 - The complete list of placeholders can be found in the Pretty Formats section of the git log manual page. Aside from letting you view only the information that you’re interested in, the --pretty=format:"<string>" option is particularly useful when you’re trying to pipe git log output into another command.
GitHub
gist.github.com › gopalsinghal › 10015758
git-cheat-sheet.md · GitHub
It's basically a log of the last few actions and you might have luck and find old commits that have been lost by doing a complex merge. ... show a diff of the changes made since your last commit to diff one file: "git diff -- " to show a diff between staging area and HEAD: git diff --cached ... show recent commits, most recent on top. Useful options: --color with color --graph with an ASCII-art commit graph on the left --decorate with branch and tag names on appropriate commits --stat with stats (files changed, insertions, and deletions) -p with full diffs --author=foo only by a certain author --after="MMM DD YYYY" ex.
Linux Kernel
kernel.org › pub › software › scm › git › docs › git-log.html
git-log(1) Manual Page
August 25, 2025 - See the description of the --diff-filter option on what the status letters mean. Just like --name-only the file names are often encoded in UTF-8. ... Specify how differences in submodules are shown. When specifying --submodule=short the short format is used. This format just shows the names of the commits at the beginning and end of the range. When --submodule or --submodule=log is specified, the log format is used. This format lists the commits in the range like git-submodule(1) summary does.
DEV Community
dev.to › _d7eb1c1703182e3ce1782 › git-cheat-sheet-60-commands-every-developer-should-know-58a8
Git Cheat Sheet: 60+ Commands Every Developer Should Know - DEV Community
1 month ago - # Show commit history git log # Compact one-line format git log --oneline # Visual branch graph git log --oneline --graph --all # Show last N commits git log -5 # Show commits by a specific author git log --author="Alice" # Show commits with a string in the message git log --grep="bug fix" # Show what changed in each commit (with diffs) git log -p # Show changes between commits git diff HEAD~1 HEAD # Show staged changes (what will be committed) git diff --staged git diff --cached # same thing # Show unstaged changes git diff # Show changes for a specific file git diff main..feature -- src/app.js # Show who changed each line (blame) git blame filename.js # Show what a commit changed git show abc1234
Atlassian
atlassian.com › dam › jcr:8132028b-024f-4b6b-953e-e68fcce0c5fa › atlassian-git-cheatsheet.pdf pdf
git clean -n Shows which files would be removed from working directory. Use
commonly use --global flag to set config options for current user. ... Show a log of changes to the local repository’s HEAD. Add · --relative-date flag to show date info or --all to show all refs. Clone repo located at <repo> onto local machine. Original repo can be · located on the local ...
Samnet
samnet.dev › learn › cheatsheets › git-cheat-sheet
Git Cheat Sheet: Every Command You Need (With Examples) | SamNet Learn
2 weeks ago - # Option 1: Revert (safe, creates new commit) git revert abc1234 # Option 2: Reset (if not pushed yet) git reset --hard HEAD~1 # WARNING: permanently destroys uncommitted changes · git checkout feature git rebase -i main # Change 'pick' to 'squash' for all but first commit # Save and edit the combined message git push --force-with-lease · Docker Cheat Sheet ·
Linux Man Pages
linux.die.net › man › 1 › git-log
git-log(1): commit logs - Linux man page
If full is specified, the full ref name (including prefix) will be printed. The default option is short. ... Print out the ref name given on the command line by which each commit was reached. ... Without this flag, "git log -p <path>..." shows commits that touch the specified paths, and diffs ...