jesus-seijas-sp

Git Switch To Main — Git skill for Claude Code

Git community

Switch to the main branch and pull the latest changes.

How to install Git Switch To Main

Installs to ~/.claude/commands/jesus-seijas-sp-claude-node-setup-git-switch-to-main.md

Terminal
mkdir -p ~/.claude/commands && curl -fsSL https://raw.githubusercontent.com/jesus-seijas-sp/claude-node-setup/HEAD/.claude/commands/git-switch-to-main.md -o ~/.claude/commands/jesus-seijas-sp-claude-node-setup-git-switch-to-main.md

Restart Claude Code, or start a new session, for it to be picked up.

What Git Switch To Main does

Switch to the main branch and pull the latest changes.

Steps

  1. Check for uncommitted changes with git status. If any exist, stop and warn the user — do not stash or discard automatically.
  2. Switch to main:
git checkout main
  1. Pull the latest changes:
git pull origin main
  1. Confirm by showing the latest commit with git log --oneline -1.

Alternatives in Git

  • Ws Reset — Reset the current branch to main, fetch upstream, and update submodules 38.1k ★
  • OSS PR — Commit + PR workflow for open source contributions: auto-creates a user-prefixed branch when on main/master, t 19.7k ★
  • Maestro Merge — Merge session worktree branch back to main 530 ★

Full documentation available on GitHub

View Source Repository