Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added .git-cheat-sheet.md.swp
Binary file not shown.
43 changes: 43 additions & 0 deletions git-cheat-sheet-mustafizur.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@

Stashing

git stash — Stash changes.

git stash list — List stashes.

git stash pop — Apply and remove latest stash.

Inspecting History & Diffs

git log — View commit history.

git log --oneline --graph — Compact graph view.

git diff — Show unstaged diff.

git diff --staged — Show staged diff.

git show <commit> — Show commit details.

Undo & Cleanup

git restore <file> — Discard local changes.

git reset --soft HEAD~1 — Undo commit, keep changes.

git reset --hard HEAD — Reset to last commit.

git clean -fd — Remove untracked files/dirs.

Tags

git tag — List tags.

git tag v1.0.0 — Create tag.

git push --tags — Push all tags.

This cheat sheet summarizes the most commonly used Git commands for everyday development workflows.

(you can also git fetch)