Installation¶
git-autosquash is distributed as a Python package and can be installed using several methods. Choose the one that best fits your workflow.
Requirements¶
- Python 3.12 or higher
- Git 2.20 or higher
- A terminal that supports ANSI colors (most modern terminals)
Installation Methods¶
uv (Recommended)¶
uv is a fast, modern Python package manager with excellent tool installation support:
Why uv?
- Fastest Python package manager available
- Built-in tool isolation like pipx
- Excellent dependency resolution
- Cross-platform compatibility
- Easy to upgrade:
uv tool upgrade git-autosquash
pipx¶
pipx creates isolated environments for each tool, avoiding dependency conflicts:
Why pipx?
- Installs tools in isolated environments
- Automatically adds executables to your PATH
- Easy to upgrade and uninstall
- No conflicts with other Python packages
pip¶
If you prefer using pip directly:
Virtual Environment Recommended
If using pip, consider installing in a virtual environment to avoid conflicts:
From Source¶
For development or latest features:
Verification¶
Verify your installation by running:
You should see output similar to:
Test the help system:
Git Integration¶
As a Git Subcommand¶
You can make git-autosquash available as a git subcommand by ensuring it's in your PATH (which the installation methods above handle automatically). Then you can use:
instead of:
Shell Completion¶
argcomplete Required
Shell completion requires the argcomplete
package:
Dependencies¶
git-autosquash automatically installs these dependencies:
- Textual - Rich terminal user interface framework
- Rich - Rich text and beautiful formatting in the terminal
System-Specific Notes¶
macOS¶
On macOS, you might need to install a more recent version of Git if using the system default:
Windows¶
git-autosquash works on Windows with:
- Git for Windows (includes Git Bash)
- Windows Terminal (recommended for best experience)
- WSL (Windows Subsystem for Linux)
Linux¶
Most modern Linux distributions include compatible versions of Git and Python. If needed:
Upgrading¶
pipx¶
pip¶
uv¶
Uninstallation¶
pipx¶
pip¶
uv¶
Troubleshooting¶
Command Not Found¶
If you get "command not found" after installation:
- Check your PATH: The installation location should be in your PATH
- Restart your terminal: Changes to PATH may require a new terminal session
- Verify installation: Run
pip list | grep git-autosquash
to confirm it's installed
Permission Errors¶
If you encounter permission errors:
- Use pipx instead of pip: pipx handles permissions automatically
- Use virtual environments: Avoid system-wide pip installations
- Check directory permissions: Ensure you can write to the installation directory
Import Errors¶
If you see import errors about missing modules:
- Check Python version: Ensure you're using Python 3.12 or higher
- Verify installation: Reinstall with
pip install --force-reinstall git-autosquash
- Check dependencies: All dependencies should install automatically
For more troubleshooting help, see our Troubleshooting Guide.