Lexicon
⌘K
Explore
ExploreGuidesNotes
WriteMy Library
Sign in
Browse

Networking

  • OSI Model
  • TCP vs UDP
  • TCP/IP Model
  • Layer 2 & Layer 3 Networking

Programming

  • Start Here — How to Solve a Problem
  • From if/else to DSA — The Whole Path
  • Problem Solving
  • DSA Practice — Learn by Solving
  • C Programming
  • Python

Bug Bounty

  • Only Bug Bounty Checklist You'll Ever Need!!!
  • Only Bug Bounty Checklist You'll Ever Need!!! V2

My Notes

  • Python Conditional Statements - The Complete Breakdown
  • Python Data Types - The Complete Breakdown
  • Python Dictionaries - The Complete Breakdown
  • Python Exception Handling - The Complete Breakdown
  • Python Functions - The Complete Breakdown
  • Python Lists vs Arrays — The Real Story
  • Python Loops - The Complete Breakdown
  • Python OOP - The Complete Breakdown
  • The f Thing in Python - f-strings

Python

  • Python String Manipulation Functions - Full Reference
New noteSuggest a guide

Lexicon

a personal knowledge base

Git

Git commands I use every day

scorpionxdevUpdated 6/16/2026 · 1 min read · 0 views
PDFHistory

A short reference of the Git commands I actually reach for daily. Not exhaustive, just the ones that earn their keep.

Checking state

git status            # what changed, what is staged
git status -sb        # compact one-line-per-file view
git diff              # unstaged changes
git diff --staged     # what is about to be committed
git log --oneline -10 # last 10 commits, terse

Staging and committing

git add -p            # stage hunks interactively
git commit -m 'msg'   # commit staged changes
git commit --amend    # fix the previous commit (before pushing)

Use git add -p more than you think. Reviewing each hunk before it lands keeps commits small and honest.

Branching

git switch -c feature/login   # create and switch to a new branch
git switch main               # move back to main
git branch -d feature/login   # delete a merged branch

git switch is the modern, clearer alternative to git checkout for branches.

Undo without panic

GoalCommand
Unstage a filegit restore --staged file
Discard local editsgit restore file
Undo last commit, keep changesgit reset --soft HEAD~1
Reading progress0%
scorpionxdev@scorpionxdev
Recover a lost commit
git reflog then git checkout <hash>

git reflog has saved me more times than I can count. Almost nothing in Git is truly gone for a couple of weeks.

Syncing

git fetch             # download refs, do not merge
git pull --rebase     # replay your commits on top of upstream
git push -u origin HEAD

I prefer pull --rebase so history stays linear instead of sprouting merge commits for every sync.

0 comments

Sign in to join the discussion.