Skip to content

stellarthemes/claude-push-to-github

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

/push-to-github — Claude Code Slash Command

A Claude Code slash command that pushes your current directory to a private GitHub repository with a smart, auto-generated commit message.

What it does

Type /push-to-github in Claude Code and it will:

  1. Analyze your changes and generate a descriptive commit message
  2. Create a .gitignore if one doesn't exist (auto-detects Node, Python, Go, Rust, Ruby, .NET, C/C++)
  3. Initialize git and create a private GitHub repo if needed
  4. Commit and push

Prerequisites

Install

mkdir -p ~/.claude/commands ~/.claude/scripts && \
curl -fsSL https://raw.githubusercontent.com/stellarthemes/claude-push-to-github/main/push-to-github.md \
  -o ~/.claude/commands/push-to-github.md && \
curl -fsSL https://raw.githubusercontent.com/stellarthemes/claude-push-to-github/main/push-to-github.sh \
  -o ~/.claude/scripts/push-to-github.sh && \
chmod +x ~/.claude/scripts/push-to-github.sh

Usage

Inside Claude Code:

/push-to-github                          # auto-generate commit message
/push-to-github my-repo                  # specify repo name
/push-to-github my-repo "Initial commit" # specify repo name and message

What gets created

~/.claude/
  commands/
    push-to-github.md    # slash command definition
  scripts/
    push-to-github.sh    # deployment script

.gitignore auto-generation

If no .gitignore exists, one is created automatically with patterns for:

  • Always: secrets (.env, *.pem, *.key, credentials.json), OS files, editor files
  • Node.js (detected via package.json): node_modules/, dist/, .next/, coverage/
  • Python (detected via requirements.txt, pyproject.toml, etc.): __pycache__/, .venv/, *.pyc
  • Go (detected via go.mod): vendor/, *.exe
  • Rust (detected via Cargo.toml): target/
  • Ruby (detected via Gemfile): vendor/bundle/, .bundle/
  • .NET (detected via *.sln, *.csproj): bin/, obj/
  • C/C++ (detected via CMakeLists.txt, Makefile): build/, *.o, *.so

License

MIT

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages