Commands
Curated shell and tool commands for Linux, Windows, Python, Git, Django, SQL, and Nginx – searchable, filterable, and copyable with one click.
29 Commands found
No commands found. Try a different search or filter.
-
Git Bash
Check whether a file is ignored and by which rule
Checks whether the given path would be ignored by Git based on .gitignore and related exclude rules, and if so, prints the exact file and pattern responsible. Replace example.log with the path to check; does not require the file to actually exist. Read-only.
git check-ignore -v example.log -
Git Bash
Check whitespace errors
Checks unstaged changes for whitespace errors such as trailing whitespace or conflicting indentation.
git diff --check -
Git Bash
Create a new local branch without switching to it
Creates a new local branch named feature/example, pointing at the current HEAD commit, without checking it out; the current branch and working tree remain unchanged. Replace feature/example with an actual descriptive branch name; fails if a branch with that name already exists.
git branch feature/example -
Git Bash
Create an annotated tag on the current commit
Creates an annotated tag named v1.0.0-example with the given message, pointing at the current HEAD commit. Replace v1.0.0-example and the message with actual values; this only creates a local tag object and does not push it to any remote, change files, or alter commit history.
git tag -a v1.0.0-example -m "Example annotated tag" -
Git Bash
Find commits that changed a string count
Find commits that change the number of occurrences of example in example.txt. Replace both placeholders.
git log -S "example" --oneline -- example.txt -
Git Bash
Find the common ancestor commit of two branches
Prints the commit hash of the best common ancestor between main and feature/example, which is useful for understanding how far two branches have diverged before merging or rebasing. Replace main and feature/example with actual existing branch names; read-only, does not modify anything.
git merge-base main feature/example -
Git Bash
Inspect file attributes
Show the Git attributes associated with example.txt, such as line-ending rules. Replace the filename.
git check-attr --all -- example.txt -
Git Bash
Interactively stage selected changes in hunks
Starts an interactive prompt that walks through each changed hunk in the working tree and lets you choose whether to stage it, skip it, or split it further. This changes the index (staging area) for the hunks you accept, but does not modify the working tree files themselves or create a commit. Requires an interactive terminal.
git add -p -
Git Bash
List all files tracked by Git
Lists every file currently tracked in the index, i.e. files that Git is aware of regardless of whether they were changed. Read-only; does not modify anything.
git ls-files -
Git Bash
List configured remotes with their URLs
Lists all configured remote repositories together with their fetch and push URLs. Read-only; does not contact the network or modify anything.
git remote -v -
Git Bash
List files with unresolved merge conflicts
Lists only the paths of files that currently have unresolved ('unmerged') conflicts in the index, without showing their actual content. Read-only; useful to quickly see which files still need manual conflict resolution.
git diff --name-only --diff-filter=U -
Git Bash
List local branches with tracking and last commit info
Lists all local branches together with their last commit and, if configured, the remote-tracking branch and ahead/behind counts. Read-only; does not modify anything.
git branch --list -vv -
Git Bash
List local tags
Lists all tags that exist in the local repository. Read-only; does not contact the network or modify anything.
git tag -l -
Git Bash
List stored stashes without applying or removing them
Lists all stash entries currently stored in the repository with their index, branch, and a short description, without applying, dropping, or modifying any of them. Read-only; useful before deciding whether to apply or inspect a particular stash.
git stash list -
Git Bash
List untracked, non-ignored files
List untracked files while respecting the standard Git ignore rules.
git ls-files --others --exclude-standard -
Git Bash
Preview untracked files and directories that would be removed
Runs git clean in dry-run mode (-n) together with -d to also consider untracked directories, printing exactly which untracked files and directories would be deleted without actually removing anything. Safe to run at any time; only use the real git clean command (without -n) after carefully reviewing this output.
git clean -n -d -
Git Bash
Preview what a fetch would update without downloading it
Contacts the default remote and prints which refs would be updated by a real git fetch, without actually downloading objects or updating any local refs. Requires network access to the configured remote; safe to run at any time.
git fetch --dry-run -
Git Bash
Search tracked files for leftover conflict markers
Searches all tracked files in the working tree for lines containing the literal conflict marker <<<<<<< anywhere in the line (the pattern is not anchored to the start of the line, though real Git conflict markers always appear at column 1 in practice), printing matching file names and line numbers. This is a literal text search, not a placeholder to replace; useful for finding conflict markers that were accidentally left in and committed. Read-only; does not modify anything.
git grep -n "<<<<<<<" -
Git Bash
Show a compact, graphical commit history
Prints the commit history as one line per commit, with an ASCII graph showing branch and merge structure and decorations such as branch and tag names. Read-only; does not modify anything.
git log --oneline --graph --decorate -
Git Bash
Show commit history of a file across renames
Shows the commit history affecting the given file, continuing to follow it across renames that Git can detect. Replace example.txt with the path to an actually tracked file. Read-only; does not modify anything.
git log --follow -- example.txt -
Git Bash
Show detailed information about the origin remote
Contacts the remote named origin and shows its URL, HEAD branch, and the local branches tracking it, including whether they are up to date. Requires network access and an already configured origin remote; does not download objects or change any refs.
git remote show origin -
Git Bash
Show line-by-line authorship for a file
Annotates each line of the given file with the commit, author, and date that last changed it. Replace example.txt with the path to an actually tracked file. Read-only; can take noticeably longer on files with a long history.
git blame example.txt -
Git Bash
Show repository status
Shows a compact summary of the current branch and working tree changes. Must be run inside a Git repository.
git status --short --branch -
Git Bash
Show staged changes compared to the last commit
Shows the differences between the index (staging area) and the most recent commit (HEAD), i.e. exactly what would be included if you committed right now. Read-only; does not modify the index, working tree, or history.
git diff --staged -
Git Bash
Show the local history of where HEAD and branches have pointed
Shows a chronological log of where HEAD (and branch tips) have pointed locally, including commits from resets, rebases, or checkouts that are no longer reachable from any branch. Read-only and often the first step to recover seemingly lost commits; entries are local only and expire over time.
git reflog -
Git Bash
Show the metadata and diff of the most recent commit
Displays the commit message, author, date, and full diff of the most recent commit on the current branch (HEAD). Read-only; does not modify anything.
git show HEAD -
Git Bash
Show unstaged changes in the working tree
Shows the differences between the working tree and the index (staging area) for already tracked files, i.e. changes that have not yet been staged with git add. Read-only; does not modify any file, the index, or the commit history.
git diff -
Git Bash
Summarize changed files
Show a compact file and line-count summary of unstaged changes.
git diff --stat -
Git Bash
Unstage a file without changing its working tree content
Removes the specified file from the index (undoing a previous git add) while leaving its content in the working tree untouched; replace example.txt with the path to an actually staged file. This is a safe, reversible operation that neither deletes the file nor creates a commit.
git restore --staged example.txt