Skip to content

A cross-platform Python GUI application for managing and browsing Git repositories with advanced filtering and branch visualization capabilities.

Notifications You must be signed in to change notification settings

danielroth1/GitRepositoryManager

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Git Repository Manager

A comprehensive Python GUI application for managing and browsing Git repositories with advanced filtering and branch visualization capabilities.

Features

Repository Management

  • Folder Selection: Browse and select any folder to scan for Git repositories
  • Recursive Scanning: Automatically finds all Git repositories in subfolders
  • Submodule Detection: Detects Git submodules (repositories with .git files instead of folders)
  • Submodule Hierarchy: Shows submodules as children under their parent repositories
  • Smart Tree View: Only displays folders that contain repositories (directly or indirectly)
  • Auto-Save: Remembers your selected folder and preferences between sessions

Filtering & Search

  • Repository Filter: Filter repositories by name using regex patterns
  • Branch Filters: Filter branches by:
    • Author name (regex supported)
    • Commit message content (regex supported)
  • Real-time Updates: All filters update the view instantly

Visual Organization

  • Color-Coded Hierarchy: Different colors for each folder level
    • Level 1: Red
    • Level 2: Blue
    • Level 3: Teal
    • Level 4: Magenta
    • Level 5: Orange
    • Level 6: Green
  • Folder vs Repository: Regular folders in dark gray, repositories in level-specific colors
  • Submodule Highlighting: Git submodules displayed in tomato color to distinguish from regular repositories

Branch Management

  • Local & Remote Branches: Separate views for local and remote branches
  • Detailed Information: Shows commit SHA, message, author, and date for each branch
  • Customizable Display: Toggle visibility of different branch information columns
  • Sortable Columns: Click column headers to sort by:
    • Branch name
    • Commit SHA
    • Commit message
    • Author
    • Date

File System Integration

  • Right-Click Context Menu: Right-click any folder to open it in File Explorer
  • Cross-Platform: Works on Windows, macOS, and Linux

Installation

  1. Clone or download this repository
  2. Ensure you have Python 3.6+ installed
  3. Install dependencies:
    pip install -r requirements.txt

Build a Windows Executable (PyInstaller)

You can package the app into a standalone Windows executable using PyInstaller.

Quick build (recommended folder/directory mode)

  1. Ensure Python is installed and available via py or python.
  2. (Optional) Create and activate a virtual environment.
  3. Install dependencies and PyInstaller:
    pip install -r requirements.txt
    pip install pyinstaller==5.13.2
  4. Build (directory mode keeps supporting files like app_data.json writable):
    pyinstaller --noconfirm --clean --name GitRepositoryManager --windowed --add-data "app_data.json;." git_repository_manager.py
  5. Run the app:
    .\dist\GitRepositoryManager\GitRepositoryManager.exe

Single-file build (optional)

Add --onefile (slower startup, settings still saved next to the exe if writable directory):

pyinstaller --noconfirm --clean --onefile --name GitRepositoryManager --windowed --add-data "app_data.json;." git_repository_manager.py

Output: dist\GitRepositoryManager.exe

Using the included script

Run the provided batch file which automates environment setup and build:

./build_exe.bat

It produces: dist\GitRepositoryManager\GitRepositoryManager.exe

Notes

  • --add-data "app_data.json;." ensures the default settings file is packaged; the app will recreate it if missing.
  • Use --windowed to suppress the console window. Omit it for debug logs in a console.
  • If you encounter missing DLL errors for pywin32, run:
    python -m pywin32_postinstall -install
  • To reduce size, you can prune the build/ folder after confirming the executable works; only dist/ is needed for distribution (for directory mode keep the whole folder).

Virus scanner false positives

Some antivirus tools may flag freshly built PyInstaller executables. Signing the binary and/or adding an exclusion typically resolves this. Building from source locally is safest.

Usage

Build a macOS executable (PyInstaller)

A small helper script is included to build on macOS using PyInstaller.

Prerequisites:

  • Python 3.x available as python3
  • Xcode command line tools (for some builds)

Quick build:

  1. Make the script executable:

    chmod +x build_macos.sh

  2. Run the build script:

    ./build_macos.sh

This script creates a virtualenv in .venv, installs requirements.txt and a pinned PyInstaller, then runs PyInstaller in directory (onedir) mode so app_data.json remains writable next to the executable.

To use the included spec file instead, run:

pyinstaller GitRepositoryManager.spec
  1. Run the Application:

    python git_repository_manager.py
  2. Select a Folder:

    • Click "Select Folder" to choose a root directory to scan
    • The application will recursively find all Git repositories
  3. Browse Repositories:

    • Expand folders in the left tree view
    • Each repository has "local" and "remote" branch categories
    • Repositories with submodules will show a "submodules" category
    • Click on "local" or "remote" to view branches in the right panel
    • Submodules are displayed as children under their parent repository
  4. Apply Filters:

    • Use the "Repository Filter" to filter repositories by name
    • Use "Branch Filter" fields to filter branches by author or commit message
    • All filters support regex patterns
  5. Customize View:

    • Use checkboxes to show/hide branch information columns
    • Click column headers to sort branches
  6. File Operations:

    • Right-click any folder to open it in your file manager

Data Persistence

The application automatically saves your preferences in app_data.json, including:

  • Selected folder path
  • Filter settings
  • Display preferences
  • Sort settings

This file is automatically added to .gitignore to avoid committing personal settings.

Keyboard Shortcuts

  • Enter: In filter fields, applies the filter
  • Right-click: On tree items, opens context menu

Troubleshooting

Git Commands Not Working

  • Ensure Git is installed and available in your system PATH
  • The application uses git commands to gather branch information

Performance with Large Repositories

  • The initial scan may take time for folders with many repositories
  • Filtering happens in real-time and should be responsive

UI Freezing

  • Repository scanning runs in a background thread to prevent UI freezing
  • If the UI becomes unresponsive, wait for the scan to complete

Technical Details

  • Framework: Python tkinter (cross-platform GUI)
  • Git Integration: Uses subprocess to call git commands
  • Threading: Background scanning to maintain UI responsiveness
  • Data Format: JSON for settings persistence

File Structure

git_repository_manager/
├── git_repository_manager.py   # Main application file
├── requirements.txt            # Dependencies (none required)
├── .gitignore                 # Git ignore file
├── app_data.json              # Settings (auto-generated)
└── README.md                  # This file

About

A cross-platform Python GUI application for managing and browsing Git repositories with advanced filtering and branch visualization capabilities.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published