Git-Get is a tool designed to streamline the process of cloning, organizing, and managing multiple Git repositories by automatically creating a directory structure based on repository URLs. This eliminates the need for manual organization, providing developers with a clean and predictable setup.
Key Features:
Automatic Organization: Repositories are organized into directories structured according to their URLs.
Git Integration: Functions as native Git commands, offering 'git get' for cloning and 'git list' for repository status.
Multi-Platform Support: Compatible with macOS, Linux, and Windows.
Repository Discovery: Provides a clear overview of all repositories, including their status.
Flexible Configuration: Allows configuration through environment variables and Git settings.
Multiple Output Formats: Offers different views (tree, flat, dump) for repository listings.
Audience & Benefit:
Ideal for developers managing numerous Git repositories, Git-Get saves time by automating organization and providing an intuitive structure to track all projects efficiently.
README
git-get
A tool to clone, organize, and manage multiple Git repositories with an automatic directory structure based on repository URLs.
git-get solves the problem of manually organizing multiple Git repositories. Instead of scattered clones in random directories, it creates a clean, predictable directory structure based on repository URLs, similar to Go's go get command.
It provides two commands through a single binary:
git get - Clones repositories into an organized directory tree
git list - Shows the status of all your repositories at a glance
Note: Both commands are provided by a single git-get binary that automatically detects how it was invoked (either directly or via symlink).
Features
Automatic organization - Creates directory structure based on repository URL
Git integration - Seamlessly integrates as native Git commands
Multi-platform - Works on macOS, Linux, and Windows
Repository discovery - Lists all repositories with their status
Flexible configuration - Supports environment variables and Git config
Multiple output formats - Tree, flat, and dump formats for different use cases
Dotfiles friendly - Clone multiple repositories from a list kept in dotfiles
Prerequisites
Git 2.0+ installed and configured
Go 1.24+ (only if building from source)
Installation
macOS
Option 1: Homebrew (Recommended)
brew install git-get
This automatically installs both git-get and git-list commands.
Option 2: Manual Installation
Download the latest macOS .tar.gz file from releases
This automatically creates both git-get.exe and git-list.exe commands.
Option 2: Manual Installation
Download the latest Windows .zip file from releases
Extract git-get.exe to a directory in your PATH
Create a copy or hard link for git-list:
# In the same directory as git-get.exe
Copy-Item git-get.exe git-list.exe
# OR create a hard link (requires admin privileges)
New-Item -ItemType HardLink -Path "git-list.exe" -Target "git-get.exe"
Building from Source
git clone https://github.com/grdl/git-get.git
cd git-get
go build -o git-get ./cmd/
# Create symlink for git-list
ln -sf git-get git-list # Unix/Linux/macOS
# OR
copy git-get.exe git-list.exe # Windows
Note: The single binary (git-get) automatically detects how it's invoked and behaves as either git-get or git-list accordingly.
Quick Start
Install git-get using one of the methods above
Clone your first repository:
git get github.com/grdl/git-get
List your repositories:
git list
That's it! Your repository is now organized in ~/repositories/github.com/grdl/git-get/.
Usage
git get
Clone repositories with automatic directory structure:
git get [flags]
Flags:
-b, --branch - Branch or tag to checkout after cloning
-d, --dump - Clone multiple repositories from a dump file
-t, --host - Default host for short repository names (default: github.com)
-r, --root - Root directory for repositories (default: ~/repositories)
-c, --scheme - Default scheme for URLs (default: ssh)
-s, --skip-host - Skip creating host directory
-h, --help - Show help
-v, --version - Show version
Repository formats:
Full URL: https://github.com/user/repo.git
SSH URL: git@github.com:user/repo.git
Short format: user/repo (uses default host)
GitHub format: github.com/user/repo
git list
Display repository status with multiple output formats:
Push to branch: git push origin feature/amazing-feature
Open a Pull Request
Testing
Run the test suite:
# Run all tests
go test ./...
# Run tests with coverage
go test -race -coverprofile=coverage.out ./...
go tool cover -html=coverage.out
# Run specific package tests
go test -v ./pkg/git
Linting
# Install golangci-lint (if not already installed)
go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest
# Run linting with the project's configuration
golangci-lint run
# Run with verbose output
golangci-lint run -v
# Fix auto-fixable issues
golangci-lint run --fix
Releasing a New Version
For maintainers releasing a new version:
Create and push a new git tag:
git tag v0.7.0
git push origin v0.7.0
GitHub Actions will automatically:
Build binaries for all platforms
Create a GitHub release with assets
Update the Scoop package
Update Homebrew-core formula:
# Replace with your actual version
brew bump-formula-pr --tag=v0.7.0 git-get
This command automatically downloads the new release, calculates checksums, updates the formula, and creates a PR to homebrew-core.
Note: Since git-get is in homebrew-core, the community or Homebrew's automated systems may also update the formula when new releases are detected.
License
This project is licensed under the MIT License - see the LICENSE.md file for details.
Acknowledgments
Inspired by:
Go's go get command for its elegant repository organization
ghq by x-motemen for repository management concepts