CheatSnip

Related

Commit Changes

git

Create a commit to permanently record staged changes in the repository history with a descriptive message

Reset Changes

git

Reset current HEAD to the specified state

Stash Changes

git

Temporarily save your uncommitted changes without committing them, allowing you to work on something else and restore them later

git/diff

Show Changes

Show changes between commits

git
diff
changes

Command

git diff

Explanation

git diff is used to show changes between commits. It shows the changes between commits.

Examples

Show unstaged changes

git diff

Show staged changes

git diff --staged

Compare with previous commit

git diff HEAD~1

More

Apply Stash

git

Reapply previously stashed changes without removing them from the stash list

Push to Remote

git

Upload your local commits to a remote repository, making your changes available to collaborators and updating the remote branch

Check Repository Status

git

Display the current state of your working directory and staging area, showing which files are modified, staged, or untracked

CheatSnip

Lightning-fast access to essential developer commands and code snippets. Search, copy, and master your favorite tools with our comprehensive cheat sheets.

Poorna Prakash

Quick Links

Git CommandsDockerNPMKubernetesYour Favorites

Legal

Terms & ConditionsPrivacy PolicyCookie Preferences

Company

About UsContact

© 2025 CheatSnip. All rights reserved.

Made with ❤️ for developers