Related
Commit Changes
Create a commit to permanently record staged changes in the repository history with a descriptive message
Reset Changes
Reset current HEAD to the specified state
Stash Changes
Temporarily save your uncommitted changes without committing them, allowing you to work on something else and restore them later
Command
git diffExplanation
git diff is used to show changes between commits. It shows the changes between commits.
Examples
Show unstaged changes
git diffShow staged changes
git diff --stagedCompare with previous commit
git diff HEAD~1More
Apply Stash
Reapply previously stashed changes without removing them from the stash list
Push to Remote
Upload your local commits to a remote repository, making your changes available to collaborators and updating the remote branch
Check Repository Status
Display the current state of your working directory and staging area, showing which files are modified, staged, or untracked