AI & Developer Tools
Git, Regex and SQL Developer Cheat Sheets
One jump-linked reference for everyday Git commands, JavaScript regular-expression syntax and portable SQL patterns.
- Jurisdiction
- Global — Git, JavaScript RegExp and PostgreSQL-style SQL examples
- Applies to
- Official documentation checked 16 November 2026
- Last verified
- 16 November 2026
At a glance
- Read Git status and diff before changing history.
- Regex syntax varies by engine; examples here use JavaScript RegExp.
- SQL features and quoting vary by database; examples use broadly portable syntax with PostgreSQL documentation as the reference.
Git
| Goal | Command |
|---|---|
| Clone | git clone <url> |
| Inspect changes | git status / git diff |
| View history | git log --oneline --decorate |
| Create branch | git switch -c <name> |
| Stage selected paths | git add <path> |
| Temporarily shelve | git stash push -m <message> |
| Undo working-tree file safely | git restore <path> |
| Compare branches | git diff main...feature |
git status
git switch -c feature/name
git add path/to/file
git diff --staged
git commit -m "Describe the change"
git fetch origin
git push -u origin feature/nameRegex (JavaScript)
| Pattern | Meaning |
|---|---|
| ^ / $ | Start / end assertion |
| . | Any character except line terminators unless dotAll is enabled |
| \d / \D | ASCII digit / non-digit |
| \w / \W | Basic Latin word character / non-word character |
| [abc] / [^abc] | Character class / negated class |
| * + ? | Zero-or-more / one-or-more / optional |
| {n,m} | Bounded repetition |
| (group) / (?:group) | Capturing / non-capturing group |
| (?=x) / (?!x) | Positive / negative lookahead |
| g i m s u y | Common JavaScript flags |
Email-shaped (not full validation): /^[^\s@]+@[^\s@]+\.[^\s@]+$/
ISO date shape: /^\d{4}-\d{2}-\d{2}$/
Trim repeated spaces: /\s+/gSQL
- Use parameters rather than concatenating user input.
- Run SELECT and inspect the filter before an UPDATE or DELETE.
- Use transactions for multi-step writes and verify the affected-row count.
- Index and execution-plan decisions depend on the actual database and workload.
SELECT c.customer_id, c.name, SUM(o.total) AS revenue
FROM customers AS c
JOIN orders AS o ON o.customer_id = c.customer_id
WHERE o.created_at >= DATE '2026-01-01'
GROUP BY c.customer_id, c.name
HAVING SUM(o.total) > 1000
ORDER BY revenue DESC
LIMIT 100;Practical answers
Frequently asked questions
Use these answers with the dated scope and authoritative sources shown on this page.
What is Git, Regex and SQL Developer Cheat Sheets?
One jump-linked reference for everyday Git commands, JavaScript regular-expression syntax and portable SQL patterns.
What are the most important points about Git, Regex and SQL Developer Cheat Sheets?
Read Git status and diff before changing history. Regex syntax varies by engine; examples here use JavaScript RegExp. SQL features and quoting vary by database; examples use broadly portable syntax with PostgreSQL documentation as the reference.
How should I use this git, regex and sql developer cheat sheets?
Read the sections on Git, Regex (JavaScript), SQL, then use the Copy Git starter commands and Copy regex examples and Copy SQL query template block where it fits your situation. Keep the inputs and assumptions with the copied result so somebody else can review it.
Which jurisdiction and effective date does this page cover?
It covers Global — Git, JavaScript RegExp and PostgreSQL-style SQL examples and is labelled for Official documentation checked 16 November 2026. Rules from another jurisdiction, tax year, product version or contract may produce a different answer.
What should I verify before acting on it?
Confirm exceptions and later changes in the linked material from Git, MDN Web Docs, PostgreSQL Global Development Group. The page was last verified 16 November 2026; provider terms, forms, thresholds, software features and local rules can change after that date.
Authoritative sources
Use the linked source for current instructions and exceptions before acting.
- Git reference and official cheat sheetGit
- JavaScript regular-expression syntax cheat sheetMDN Web Docs
- SQL language tutorialPostgreSQL Global Development Group
Educational reference only. It is not legal, tax, accounting, lending, insurance or investment advice.
