working-with-git
Git version control cheatsheet - viewing history, making commits, diffs, and descriptions
What this skill does
# Working with Git
Quick reference for common Git operations used in development workflows.
## Detecting Git
Check if the project uses Git:
```bash
test -d .git && echo "git" || echo "not git"
```
## Viewing the Log
**Show recent commits:**
```bash
git log --oneline -10
```
**Show log with graph:**
```bash
git log --oneline --graph --all -10
```
**Show specific commit:**
```bash
git log -1 <commit-sha>
```
**Find commits by message:**
```bash
git log --oneline --grep="keyword"
```
## Viewing Diffs
**See uncommitted changes:**
```bash
git diff
```
**See staged changes:**
```bash
git diff --cached
```
**Diff between commits:**
```bash
git diff <base-sha>..<head-sha>
```
**Diff stats:**
```bash
git diff --stat <base-sha>..<head-sha>
```
**Show what changed in a commit:**
```bash
git show <commit-sha>
```
## Getting Commit References
**Current commit SHA:**
```bash
git rev-parse HEAD
```
**Parent commit SHA:**
```bash
git rev-parse HEAD~1
```
**Branch's remote tracking commit:**
```bash
git rev-parse origin/main
```
**Relative references:**
- `HEAD` - current commit
- `HEAD~1` or `HEAD^` - parent commit
- `HEAD~2` - grandparent commit
- `origin/main` - remote branch tip
## Making Commits
**Stage and commit:**
```bash
git add <files>
git commit -m "commit message"
```
**Commit all tracked changes:**
```bash
git commit -am "commit message"
```
**Stage specific hunks interactively:**
```bash
git add -p
```
## Modifying Commit Descriptions
**Amend last commit message:**
```bash
git commit --amend -m "new message"
```
**Amend last commit (open editor):**
```bash
git commit --amend
```
**Change older commit messages (interactive rebase):**
```bash
git rebase -i HEAD~3
```
(Then mark commits with `reword` in the editor)
## Branch Information
**Current branch:**
```bash
git branch --show-current
```
**Check if branch tracks remote:**
```bash
git rev-parse --abbrev-ref --symbolic-full-name @{u} 2>/dev/null
```
## Quick Status
**See working tree status:**
```bash
git status
```
**Short status:**
```bash
git status -s
```
## Common Patterns
**Get range for code review:**
```bash
BASE_SHA=$(git rev-parse HEAD~1)
HEAD_SHA=$(git rev-parse HEAD)
echo "Reviewing: $BASE_SHA..$HEAD_SHA"
```
**Compare against main:**
```bash
git diff origin/main..HEAD
```
**See files changed:**
```bash
git diff --name-only <base>..<head>
```
Related in General
modeling-omnistudio-epc-catalog
IncludedSalesforce Industries CME EPC product-modeling skill for Product2-based catalog creation. Use when creating EPC products, configuring product attributes, building offer bundles with Product Child Items, or reviewing EPC DataPack JSON metadata for product catalog changes. TRIGGER when: user creates or updates Product2 EPC records, AttributeAssignment payloads, AttributeMetadata/AttributeDefaultValues, Offer bundles, or ProductChildItem relationships. DO NOT TRIGGER when: designing OmniScripts/FlexCards/Integration Procedures (use building-omnistudio-omniscript, building-omnistudio-flexcard, or building-omnistudio-integration-procedure), implementing Apex business logic (use generating-apex), or troubleshooting deployment pipelines (use deploying-metadata).
relationship-science-coach
IncludedUse this skill for direct, practical adult relationship coaching: couples conflict, repair, trust, marriage, dating, flirting, attachment patterns, emotional connection, sex, desire differences, eroticism, kink negotiation, affection, love languages, breakups, and long-term passion. Draw on Gottman, EFT and Hold Me Tight, attachment science, modern sex research, Perel, Nagoski, Kerner, Schnarch, Love and Stosny, and flexible love-language tools. Be concrete and low-hedge. Redirect only for imminent danger, abuse, coercive control, minors, non-consent, self-harm, stalking, or medical/legal/psychiatric decisions.
building-sf-integrations
IncludedSalesforce integration architecture and runtime plumbing with 120-point scoring. Use this skill to set up Named Credentials, External Credentials, External Services, REST/SOAP callout patterns, Platform Events, and Change Data Capture. TRIGGER when: user sets up Named Credentials, External Services, REST/SOAP callouts, Platform Events, CDC, or touches .namedCredential-meta.xml files. DO NOT TRIGGER when: Connected App/OAuth config (use configuring-connected-apps), Apex-only logic (use generating-apex), or data import/export (use handling-sf-data).
venue-templates
IncludedAccess comprehensive LaTeX templates, formatting requirements, and submission guidelines for major scientific publication venues (Nature, Science, PLOS, IEEE, ACM), academic conferences (NeurIPS, ICML, CVPR, CHI), research posters, and grant proposals (NSF, NIH, DOE, DARPA). This skill should be used when preparing manuscripts for journal submission, conference papers, research posters, or grant proposals and need venue-specific formatting requirements and templates.
let-fate-decide
IncludedDraws the 12 Houses of the Zodiac Tarot spread to inject entropy into planning when prompts are vague, ambiguous, or casually delegated. Interprets the spread to guide next steps. Use when the user says 'let fate decide', 'YOLO', 'whatever', 'idk', or other nonchalant phrases, makes Yu-Gi-Oh references, or when you are about to arbitrarily pick between multiple reasonable approaches. Prefer over ask-questions-if-underspecified when the user's tone is casual or playful rather than precision-seeking.
net-ops
IncludedCross-platform network troubleshooting (Windows, macOS, Linux) via local or remote shell. Use for: DNS broken, can't resolve hostnames, nslookup/dig works but apps fail, NRPT, WFP, scutil, /etc/resolver, systemd-resolved, /etc/resolv.conf, NetworkManager, VPN DNS leak residue (ProtonVPN/Mullvad/WireGuard/AnyConnect), AV/firewall blocking DNS or DoH, Tailscale DNS interaction, intermittent connectivity, remote diagnostics over SSH.