git-config
Comprehensive Git configuration guide covering global settings, aliases, performance tuning, credential management, maintenance, .gitattributes, clone shortcuts, and troubleshooting. Use when configuring Git beyond basic setup, optimizing Git performance, setting up aliases, managing credentials (GitHub CLI, Windows Credential Manager), configuring line ending strategy, setting up .gitattributes, enabling Git maintenance, or troubleshooting configuration issues. Cross-platform guidance for Windows, macOS, and Linux.
What this skill does
# Git Configuration Comprehensive guidance for configuring Git beyond basic installation. This skill covers global configuration, performance optimization, aliases, credential management, maintenance, and advanced configuration topics. ## Table of Contents - [Overview](#overview) - [When to Use](#when-to-use-this-skill) - [Quick Start](#quick-start) - [Configuration Files](#configuration-file-locations) - [Global Settings](#global-configuration-settings) - [Rerere](#managing-rerere-reuse-recorded-resolution) - [Line Endings](#line-ending-strategy-defense-in-depth) - [Aliases](#aliases) - [Clone Shortcuts](#clone-shortcuts) - [Repository-Level Config](#repository-level-configuration) - [Maintenance](#maintenance) - [Git Attributes](#git-attributes) - [Credentials](#git-credential-management) - [Troubleshooting](#troubleshooting) - [Test Scenarios](#test-scenarios) ## Overview This skill helps you: - Configure Git globally for optimal performance and workflow - Set up powerful aliases to streamline common operations - Manage Git credentials securely (GitHub CLI, Windows Credential Manager) - Configure `.gitattributes` for line ending control - Enable Git maintenance for better repository performance - Understand repository-level vs global configuration - Troubleshoot common configuration issues **For basic Git installation and setup**, see the **setup** skill. ## Example Use Cases This skill activates for questions like: - "How do I set up Git aliases for common operations?" - "Configure Git to use GitHub CLI for authentication" - "My Git is slow on large repos - how can I optimize performance?" - "Set up .gitattributes for cross-platform development" - "Enable Git background maintenance" - "Troubleshoot 'refusing to allow OAuth App to create workflow' error" - "Configure Git credential helpers on Windows" - "Set up clone shortcuts for frequently-used repositories" - "Configure rerere to remember merge conflict resolutions" ## When to Use This Skill Use this skill when: - Configuring Git beyond basic user identity - Setting up aliases for common Git operations - Optimizing Git performance (fsmonitor, untrackedCache, parallel operations) - Managing Git credentials (HTTPS, SSH, token scopes) - Setting up GitHub CLI as credential helper - Configuring `.gitattributes` for cross-platform line ending control - Enabling Git background maintenance - Setting up clone shortcuts for frequently-used repositories - Troubleshooting credential issues or line ending errors - Understanding Git configuration hierarchy (system/global/local) ## Quick Start **Most impactful configuration settings to apply immediately:** ```bash # Performance improvements git config --global core.fsmonitor true git config --global core.untrackedCache true git config --global fetch.parallel 8 git config --global checkout.workers 8 # Better pull/rebase workflow git config --global pull.rebase true git config --global rebase.autoStash true git config --global rebase.updateRefs true # Auto-prune deleted remote branches git config --global fetch.prune true git config --global fetch.pruneTags true # Better merge conflict resolution git config --global merge.conflictstyle zdiff3 # Auto-setup remote tracking on first push git config --global push.autoSetupRemote true # Better diff algorithm git config --global diff.algorithm histogram git config --global diff.colorMoved zebra # Line ending safety check git config --global core.safecrlf warn ``` --- ## Quick Reference Common Git configuration settings organized by category for quick lookup (performance, pull/rebase, fetch, push, diff, merge, line endings, sorting, maintenance). **📚 Complete Quick Reference Table:** [references/quick-reference.md](references/quick-reference.md) The quick reference table provides copy-paste commands for all common settings with category organization and purpose explanations. --- ## Configuration File Locations For detailed information about Git configuration file locations, hierarchy, and viewing configuration, see [references/configuration-basics.md](references/configuration-basics.md). **Quick summary:** - **System**: `/etc/gitconfig` (or Git install dir on Windows) - All users - **Global**: `~/.gitconfig` or `~/.config/git/config` - Current user - **Local**: `.git/config` - Single repository only - **Priority**: Local > Global > System **View configuration:** ```bash # View all configuration with source files git config --list --show-origin # View specific value git config user.name ``` --- ## Global Configuration Settings These settings are cross-platform and recommended for all users. They should be set at the **global** level unless you need repository-specific overrides. **Most Essential Settings (Quick Start):** ```bash # Pull & rebase (cleaner history) git config --global pull.rebase true git config --global rebase.autoStash true # Fetch (auto-prune deleted branches/tags) git config --global fetch.prune true git config --global fetch.pruneTags true git config --global fetch.parallel 8 # Push (auto-setup remote tracking) git config --global push.autoSetupRemote true # Diff & merge (better algorithms and conflict display) git config --global diff.algorithm histogram git config --global diff.colorMoved zebra git config --global merge.conflictstyle zdiff3 # Performance (filesystem monitoring) git config --global core.fsmonitor true git config --global core.untrackedCache true # Sorting (newest first) git config --global branch.sort -committerdate git config --global tag.sort -taggerdate ``` **📚 Complete Global Configuration Guide:** [references/global-configuration.md](references/global-configuration.md) Topics covered: Pull & rebase strategy, fetch strategy, push strategy, checkout/switch strategy, commit settings, status settings, diff settings, merge settings, rerere (conflict resolution memory), color settings, sorting, log settings, performance settings, submodule strategy, miscellaneous settings, and advanced configuration options. --- ## Managing rerere (Reuse Recorded Resolution) Git's rerere feature remembers how you resolved merge conflicts and can reapply those resolutions automatically. **Enable rerere:** ```bash git config --global rerere.enabled true git config --global rerere.autoUpdate true ``` **For detailed information about how rerere works, safety considerations, and management commands**, see [references/configuration-basics.md](references/configuration-basics.md#managing-rerere-reuse-recorded-resolution) ## Line Ending Strategy (Defense in Depth) **Cross-platform line ending management uses a layered approach:** 1. **System level (autocrlf)**: Platform-specific default (Windows: `true`, macOS/Linux: `input`) 2. **Global level (safecrlf)**: Warns about MIXED endings (actual problems) but allows legitimate conversions 3. **Repository level (.gitattributes)**: Explicit control per file type **Defense in depth:** These settings are **complementary, not conflicting**: - `autocrlf` handles the conversion automatically - `safecrlf=warn` warns about PROBLEMS (mixed line endings) but doesn't block .gitattributes conversions - `.gitattributes` provides per-repo fine-grained control **Important:** Don't use `safecrlf=true` when you have `.gitattributes` - it will block legitimate conversions and cause constant errors! **Platform-specific autocrlf settings:** - **Windows**: `git config --global core.autocrlf true` (converts LF→CRLF on checkout, CRLF→LF on commit) - **macOS/Linux**: `git config --global core.autocrlf input` (converts CRLF→LF on commit, no conversion on checkout) - **WSL**: `git config --global core.autocrlf input` (same as Linux) **Global safecrlf setting (all platforms):** ```bash # Warn about mixed line endings (safeguard against problems) # Use 'warn' not 'true' - allows .gitattributes to work without constant errors git config --global core.safecrlf warn ``` **For detailed .gitattributes setup and comprehensive line
Related in Code Review
gstack
IncludedFast headless browser for QA testing and site dogfooding. Navigate pages, interact with elements, verify state, diff before/after, take annotated screenshots, test responsive layouts, forms, uploads, dialogs, and capture bug evidence. Use when asked to open or test a site, verify a deployment, dogfood a user flow, or file a bug with screenshots. (gstack)
startup-due-diligence
IncludedLegal due diligence review for seed-stage and Series A startups (US, Delaware C-Corp focus). Supports both investor and founder perspectives. Capabilities include: (1) Interactive document review and issue spotting; (2) Document request list generation; (3) Cap table and SAFE/convertible note analysis; (4) Red flag identification with severity ratings; (5) Diligence report generation. TRIGGERS: due diligence, DD, startup investment, cap table review, Series A, seed round, investor diligence, legal review startup, SAFE analysis, convertible note, 409A, founder vesting.
interview-master
IncludedThis skill should be used when the user asks to "generate interview questions", "prepare for interview", "optimize resume", "conduct mock interview", "analyze git commits for resume", "generate resume from code", "review my resume", or mentions interview preparation, career assistance, or extracting project experience from git history. Provides comprehensive interview and career development guidance for both job seekers and interviewers.
fix-issue
IncludedFixes GitHub issues using parallel analysis agents for root cause investigation, code exploration, and regression detection. Reads issue context from gh CLI, searches codebase and memory for related patterns, generates a fix with tests, and links the resolution back to the issue via PR. Includes prevention analysis to avoid recurrence. Use when debugging errors, resolving regressions, fixing bugs, or triaging issues.
sf-apex
IncludedGenerates and reviews Salesforce Apex code with 150-point scoring. TRIGGER when: user writes, reviews, or fixes Apex classes, triggers, test classes, batch/queueable/schedulable jobs, or touches .cls/.trigger files. DO NOT TRIGGER when: LWC JavaScript (use sf-lwc), Flow XML (use sf-flow), SOQL-only queries (use sf-soql), or non-Salesforce code.
swift-development
IncludedComprehensive Swift development for building, testing, and deploying iOS/macOS applications. Use when Claude needs to: (1) Build Swift packages or Xcode projects from command line, (2) Run tests with XCTest or Swift Testing framework, (3) Manage iOS simulators with simctl, (4) Handle code signing, provisioning profiles, and app distribution, (5) Format or lint Swift code with SwiftFormat/SwiftLint, (6) Work with Swift Package Manager (SPM), (7) Implement Swift 6 concurrency patterns (async/await, actors, Sendable), (8) Create SwiftUI views with MVVM architecture, (9) Set up Core Data or SwiftData persistence, or any other Swift/iOS/macOS development tasks.