Skip to content
Back to skills

1660 Status 1d65386d

ASecurity

Check repository status, changes, and sync state.

  • 9 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added May 31, 2026
businessbashgit

Security analysis

A100/100

Pro scans all 2 files and shows the line behind each finding

Scanned May 31, 2026

npx -y skills add tools-only/X-Skills --skill 1660-status_1d65386d --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of 1660 Status 1d65386d?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for 1660 Status 1d65386d
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/tools-only-1660-status-1d65386d/badge)](https://www.skillsdirectory.com/skills/tools-only-1660-status-1d65386d)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
# Status Workflow

Check repository status, changes, and sync state.

## Prerequisites

- Git repository initialized

## Basic Status

```bash
# Full status
git status

# Short format
git status -s

# With branch tracking info
git status -sb
```

## Status Output Explained

### Full Status Format

```text
On branch main
Your branch is ahead of 'origin/main' by 2 commits.

Changes to be committed:
  (staged)
        modified:   file1.js
        new file:   file2.js

Changes not staged for commit:
  (unstaged)
        modified:   file3.js
        deleted:    file4.js

Untracked files:
  (new files not yet added)
        file5.js
```

### Short Status Format

```text
 M file1.js    # Modified (unstaged)
M  file2.js    # Modified (staged)
MM file3.js    # Modified (staged + unstaged)
A  file4.js    # Added (staged)
 D file5.js    # Deleted (unstaged)
D  file6.js    # Deleted (staged)
?? file7.js    # Untracked
!! ignored.js  # Ignored
```

**Position meanings:**

- First column: Staged changes
- Second column: Unstaged changes

## Workflow Steps

### Step 1: Check Overall Status

```bash
# Get full picture
git status

# Quick view
git status -sb
```

### Step 2: Review Specific Changes

```bash
# Unstaged changes
git diff

# Staged changes
git diff --cached

# All changes (staged + unstaged)
git diff HEAD
```

### Step 3: Check Remote Sync

```bash
# Fetch remote info
git fetch origin

# Check ahead/behind
git status

# Detailed comparison
git log origin/main..HEAD --oneline   # Local not on remote
git log HEAD..origin/main --oneline   # Remote not in local
```

### Step 4: List Changed Files

```bash
# Names only
git diff --name-only

# With status
git diff --name-status

# Stats summary
git diff --stat
```

## Detailed Status Commands

### Branch Information

```bash
# Current branch
git branch --show-current

# All branches with details
git branch -vv

# Remote tracking info
git remote show origin
```

### Commit Status

```bash
# Last commit
git log -1

# Unpushed commits
git log origin/main..HEAD --oneline

# Commits to pull
git log HEAD..origin/main --oneline
```

### File Status

```bash
# Check specific file
git status -- path/to/file

# List ignored files
git status --ignored

# Show ignored too (short)
git status -s --ignored
```

### Worktree Status

```bash
# Check if in repo
git rev-parse --is-inside-work-tree

# Get repo root
git rev-parse --show-toplevel

# Current directory relative to root
git rev-parse --show-prefix
```

## Common Status Scenarios

### Clean Working Directory

```text
On branch main
Your branch is up to date with 'origin/main'.

nothing to commit, working tree clean
```

### Ready to Commit

```text
On branch feature/xyz
Changes to be committed:
        modified:   src/app.js
        new file:   src/utils.js

All staged - ready for: git commit
```

### Need to Stage

```text
On branch feature/xyz
Changes not staged for commit:
        modified:   src/app.js

Stage with: git add src/app.js
```

### Ahead of Remote

```text
Your branch is ahead of 'origin/main' by 3 commits.

Push with: git push origin main
```

### Behind Remote

```text
Your branch is behind 'origin/main' by 2 commits.

Pull with: git pull origin main
```

### Diverged

```text
Your branch and 'origin/main' have diverged,
and have 2 and 3 different commits each.

Options:
1. Merge: git pull origin main
2. Rebase: git rebase origin/main
```

## Output Format

Provide status in this structured format:

```text
Repository Status
─────────────────

Branch: <current-branch>
Remote: <tracking-branch>
Status: [Clean | Changes pending | Conflicts]

Sync Status:
  Ahead: <count> commits
  Behind: <count> commits

Changes:
  Staged:
    - <file1> (modified)
    - <file2> (new file)

  Unstaged:
    - <file3> (modified)
    - <file4> (deleted)

  Untracked:
    - <file5>
    - <file6>

Recommendations:
  - <action to take>
```

## Quick Commands Reference

| Command | Purpose |
|---------|---------|
| `git status` | Full status |
| `git status -s` | Short format |
| `git status -sb` | Short with branch |
| `git diff` | Unstaged changes |
| `git diff --cached` | Staged changes |
| `git diff --stat` | Summary stats |
| `git log -1` | Last commit |
| `git branch -vv` | Branch tracking |

## Safety Checks

Before major operations, always check:

1. **Current branch** - Am I on the right branch?
2. **Uncommitted changes** - Will they be lost?
3. **Sync status** - Am I up to date with remote?
4. **Staged vs unstaged** - What exactly will be committed?

Files in this skill

  • README.md849 B
  • skill.md4.4 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.