PHPackages                             ahmedhsieb/laravel-git-manager - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [DevOps &amp; Deployment](/categories/devops)
4. /
5. ahmedhsieb/laravel-git-manager

ActiveLibrary[DevOps &amp; Deployment](/categories/devops)

ahmedhsieb/laravel-git-manager
==============================

A complete Git management interface for Laravel applications with web UI, custom commands, and authentication

V1.2.0(4mo ago)022MITPHPPHP ^7.4|^8.0

Since Dec 16Pushed 4mo agoCompare

[ Source](https://github.com/Ahmedhsieb/laravel-git-manager)[ Packagist](https://packagist.org/packages/ahmedhsieb/laravel-git-manager)[ RSS](/packages/ahmedhsieb-laravel-git-manager/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (4)Versions (4)Used By (0)

Laravel Git Manager
===================

[](#laravel-git-manager)

[![Latest Version](https://camo.githubusercontent.com/654d420f2eeff1e8a40e9f47229ac8314dd57c1dfee8823036d31c8c90324588/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f61686d656468736965622f6c61726176656c2d6769742d6d616e616765722e737667)](https://packagist.org/packages/ahmedhsieb/laravel-git-manager)[![Total Downloads](https://camo.githubusercontent.com/a08f2b750a43909cc483a88fec66b47a60ce1e65fc020a2fbb32ecd26e9b07e5/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f61686d656468736965622f6c61726176656c2d6769742d6d616e616765722e737667)](https://packagist.org/packages/ahmedhsieb/laravel-git-manager)[![License](https://camo.githubusercontent.com/ef101ffa3e46e21a595f75f4c4a4c41e97da99e050a77e62bde81f4b2841ed1d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f61686d656468736965622f6c61726176656c2d6769742d6d616e616765722e737667)](https://packagist.org/packages/ahmedhsieb/laravel-git-manager)

A complete, production-ready Git management interface for Laravel applications. Manage your repository through a beautiful web interface without ever touching the terminal.

[![Git Manager Screenshot](image.png)](image.png)

✨ Features
----------

[](#-features)

### 🎯 Core Git Operations

[](#-core-git-operations)

- **Add, Commit, Push, Pull, Fetch** - All basic Git operations
- **Branch Management** - Create, switch, merge, and delete branches
- **Stash Operations** - Stash and apply changes
- **Reset &amp; Revert** - Undo changes safely
- **Status Monitoring** - Real-time repository status

### 🚀 Advanced Features

[](#-advanced-features)

- **Custom Git Commands** - Execute any git command
- **Custom Artisan Commands** - Run Laravel commands
- **Real-time Output Console** - See command results instantly
- **Branch Switcher** - Quick branch navigation
- **Commit History** - View recent commits
- **File Diff Viewer** - Check file differences

### 🔐 Security Features

[](#-security-features)

- **Password Protection** - Secure access with bcrypt hashed passwords
- **Session Management** - Configurable session timeout
- **Dangerous Command Blocking** - Prevents destructive commands
- **CSRF Protection** - All requests protected
- **IP Whitelisting** - Optional IP restrictions

### 🎨 User Experience

[](#-user-experience)

- **Beautiful UI** - Modern, responsive design with Tailwind CSS
- **Standalone Layout** - No dependencies on your app's layout
- **Real-time Updates** - Live status and branch information
- **Keyboard Shortcuts** - Ctrl+Enter to commit quickly
- **Dark Console** - Terminal-style output display

📋 Requirements
--------------

[](#-requirements)

- PHP 7.4 or higher
- Laravel 8.x, 9.x, 10.x, or 11.x
- Git installed on server
- Composer

🚀 Installation
--------------

[](#-installation)

### Step 1: Install Package

[](#step-1-install-package)

```
composer require ahmedhsieb/laravel-git-manager
```

The package will be automatically discovered by Laravel.

### Step 2: Run Setup Wizard

[](#step-2-run-setup-wizard)

```
php artisan git-manager:setup
```

The interactive setup wizard will ask you for:

1. **Git Username** - Your GitHub/GitLab/Bitbucket username
2. **Personal Access Token** - Your Git provider token
3. **User Name** - Name that appears in commits
4. **User Email** - Email that appears in commits
5. **Access Password** - Password to protect the web interface

### Step 3: Generate Personal Access Token

[](#step-3-generate-personal-access-token)

#### GitHub

[](#github)

1. Go to
2. Click "Generate new token (classic)"
3. Give it a name: "Laravel Git Manager"
4. Select scopes: ✅ `repo` (Full control of private repositories)
5. Click "Generate token"
6. Copy the token (save it - you won't see it again!)

#### GitLab

[](#gitlab)

1. Go to [https://gitlab.com/-/profile/personal\_access\_tokens](https://gitlab.com/-/profile/personal_access_tokens)
2. Create new token
3. Select scopes: `api`, `read_repository`, `write_repository`
4. Create and copy the token

#### Bitbucket

[](#bitbucket)

1. Go to
2. Create app password
3. Select permissions: Repositories (Read, Write, Admin)
4. Create and copy the password

### Step 4: Access Git Manager

[](#step-4-access-git-manager)

Visit: `http://your-domain.com/git-manager`

Login with the password you set during setup.

🎯 Usage
-------

[](#-usage)

### Web Interface

[](#web-interface)

#### Basic Workflow

[](#basic-workflow)

1. Click **"Pull"** to get latest changes
2. Make your code changes
3. Type a commit message
4. Click **"Add + Commit + Push"**

#### Branch Management

[](#branch-management)

- **Create Branch**: Type branch name → Click "Create &amp; Checkout"
- **Switch Branch**: Click any branch in the sidebar
- **Merge Branch**: Type branch name → Click "Merge"

#### Custom Commands

[](#custom-commands)

Execute any git command:

```
status -s
log --oneline -10
branch -a
remote -v

```

Execute any artisan command:

```
cache:clear
migrate:status
queue:work --once

```

### Command Line

[](#command-line)

#### Update Configuration

[](#update-configuration)

```
# Update any setting
php artisan git-manager:config

# Update specific setting
php artisan git-manager:config username
php artisan git-manager:config password
php artisan git-manager:config token
```

#### Check Status

[](#check-status)

```
php artisan route:list | grep git-manager
```

⚙️ Configuration
----------------

[](#️-configuration)

### Publishing Configuration File

[](#publishing-configuration-file)

```
php artisan vendor:publish --tag=git-manager-config
```

This creates `config/git-manager.php` where you can customize:

```
return [
    'username' => env('GIT_MANAGER_USERNAME', ''),
    'token' => env('GIT_MANAGER_TOKEN', ''),
    'user_name' => env('GIT_MANAGER_USER_NAME', ''),
    'user_email' => env('GIT_MANAGER_USER_EMAIL', ''),
    'access_password' => env('GIT_MANAGER_PASSWORD', ''),
    'session_duration' => env('GIT_MANAGER_SESSION_DURATION', 120), // minutes
    'route_prefix' => env('GIT_MANAGER_ROUTE_PREFIX', 'git-manager'),
    'middleware' => ['web'],
    'timeout' => env('GIT_MANAGER_TIMEOUT', 300), // seconds
];
```

### Environment Variables

[](#environment-variables)

Add to your `.env` file:

```
GIT_MANAGER_USERNAME=your-github-username
GIT_MANAGER_TOKEN=ghp_your_token_here
GIT_MANAGER_USER_NAME="Your Full Name"
GIT_MANAGER_USER_EMAIL=your@email.com
GIT_MANAGER_PASSWORD=your_hashed_password
GIT_MANAGER_SESSION_DURATION=120
GIT_MANAGER_ROUTE_PREFIX=git-manager
GIT_MANAGER_TIMEOUT=300
```

### Custom Route Prefix

[](#custom-route-prefix)

Change the URL prefix in `.env`:

```
GIT_MANAGER_ROUTE_PREFIX=admin/git
```

Access at: `http://your-domain.com/admin/git`

### Additional Middleware

[](#additional-middleware)

Add authentication or other middleware:

```
// config/git-manager.php
'middleware' => ['web', 'auth', 'admin'],
```

### Publishing Views

[](#publishing-views)

To customize the views:

```
php artisan vendor:publish --tag=git-manager-views
```

Views will be published to `resources/views/vendor/git-manager/`

🔒 Security
----------

[](#-security)

### Password Protection

[](#password-protection)

The interface is protected by a password set during setup. Passwords are bcrypt hashed and never stored in plain text.

### Session Management

[](#session-management)

Sessions expire after 2 hours (configurable). Users must login again after expiration.

### IP Whitelisting

[](#ip-whitelisting)

Add IP restrictions by modifying your routes:

```
// routes/web.php
Route::prefix(config('git-manager.route_prefix'))
    ->middleware(function ($request, $next) {
        $allowedIps = ['127.0.0.1', 'your.server.ip'];
        if (!in_array($request->ip(), $allowedIps)) {
            abort(403);
        }
        return $next($request);
    })
    ->group(function () {
        // Git Manager routes
    });
```

### Dangerous Commands

[](#dangerous-commands)

Dangerous commands like `rm`, `clean -fd`, and `reset --hard HEAD~` are blocked automatically.

📝 API Endpoints
---------------

[](#-api-endpoints)

All endpoints require authentication via password-protected session.

### Repository Info

[](#repository-info)

- `GET /git-manager/status` - Repository status
- `GET /git-manager/current-branch` - Current branch
- `GET /git-manager/branches` - List all branches
- `GET /git-manager/log?limit=10` - Commit history

### Operations

[](#operations)

- `POST /git-manager/add` - Stage files
- `POST /git-manager/commit` - Commit changes
- `POST /git-manager/push` - Push to remote
- `POST /git-manager/pull` - Pull from remote
- `POST /git-manager/fetch` - Fetch from remote

### Branch Management

[](#branch-management-1)

- `POST /git-manager/checkout` - Switch branch
- `POST /git-manager/branch/create` - Create branch
- `POST /git-manager/merge` - Merge branch
- `DELETE /git-manager/branch/delete` - Delete branch

### Advanced

[](#advanced)

- `POST /git-manager/custom` - Execute custom git command
- `POST /git-manager/artisan` - Execute artisan command
- `POST /git-manager/full-push` - Add + Commit + Push

🐛 Troubleshooting
-----------------

[](#-troubleshooting)

### "Setup Required" Page Shows

[](#setup-required-page-shows)

Run the setup command:

```
php artisan git-manager:setup
```

### "Authentication Failed" on Push/Pull

[](#authentication-failed-on-pushpull)

1. Check token is valid: Visit GitHub → Settings → Tokens
2. Verify token has `repo` scope
3. Update token: ```
    php artisan git-manager:config token
    ```

### "Please tell me who you are" Error

[](#please-tell-me-who-you-are-error)

Configure git user:

```
php artisan git-manager:config user_name
php artisan git-manager:config user_email
```

Or manually:

```
git config --global user.name "Your Name"
git config --global user.email "your@email.com"
```

### Permission Denied

[](#permission-denied)

Give web server write access:

```
# Linux/Unix
sudo chown -R www-data:www-data /path/to/repo
sudo chmod -R 775 /path/to/repo/.git

# Or for nginx
sudo chown -R nginx:nginx /path/to/repo
```

### Commands Timeout

[](#commands-timeout)

Increase timeout in `.env`:

```
GIT_MANAGER_TIMEOUT=600
```

### Views Not Loading

[](#views-not-loading)

Clear cache:

```
php artisan view:clear
php artisan cache:clear
php artisan config:clear
```

### Routes Not Working

[](#routes-not-working)

Clear route cache:

```
php artisan route:clear
composer dump-autoload
```

💡 Tips &amp; Best Practices
---------------------------

[](#-tips--best-practices)

### Commit Messages

[](#commit-messages)

Use clear, descriptive commit messages:

```
feat: Add user authentication
fix: Resolve login issue
docs: Update README
style: Format code
refactor: Simplify validation logic

```

### Branch Naming

[](#branch-naming)

Follow a consistent naming convention:

```
feature/new-feature
bugfix/issue-123
hotfix/critical-fix
release/v1.0.0

```

### Workflow

[](#workflow)

1. Always **pull** before starting work
2. Create a **feature branch** for new work
3. **Commit** frequently with clear messages
4. **Push** regularly to backup your work
5. **Merge** when feature is complete

### Safety

[](#safety)

- Always **pull** before pushing
- Review changes before committing
- Use **stash** when switching branches with uncommitted changes
- Be careful with **reset --hard**

🤝 Contributing
--------------

[](#-contributing)

Contributions are welcome! Please feel free to submit a Pull Request.

1. Fork the repository
2. Create your feature branch (`git checkout -b feature/AmazingFeature`)
3. Commit your changes (`git commit -m 'Add some AmazingFeature'`)
4. Push to the branch (`git push origin feature/AmazingFeature`)
5. Open a Pull Request

📄 License
---------

[](#-license)

This package is open-sourced software licensed under the [MIT license](LICENSE).

👨‍💻 Author
----------

[](#‍-author)

**Ahmed Osama**

- Email:
- GitHub: [@ahmedhsieb](https://github.com/ahmedhsieb)

🙏 Acknowledgments
-----------------

[](#-acknowledgments)

- Built with [Laravel](https://laravel.com)
- UI powered by [Tailwind CSS](https://tailwindcss.com)
- Icons by [Font Awesome](https://fontawesome.com)

📊 Stats
-------

[](#-stats)

[![GitHub stars](https://camo.githubusercontent.com/b5a0fcee7300ab0f4473822f4780193c334ab86ff0a77e5e0f876f801cdcc876/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f73746172732f61686d656468736965622f6c61726176656c2d6769742d6d616e616765723f7374796c653d736f6369616c)](https://camo.githubusercontent.com/b5a0fcee7300ab0f4473822f4780193c334ab86ff0a77e5e0f876f801cdcc876/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f73746172732f61686d656468736965622f6c61726176656c2d6769742d6d616e616765723f7374796c653d736f6369616c)[![GitHub forks](https://camo.githubusercontent.com/eb45f22dfc44adab5ab2a7f265daf352c15f3f729db76d591de1764b2c0059e8/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f666f726b732f61686d656468736965622f6c61726176656c2d6769742d6d616e616765723f7374796c653d736f6369616c)](https://camo.githubusercontent.com/eb45f22dfc44adab5ab2a7f265daf352c15f3f729db76d591de1764b2c0059e8/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f666f726b732f61686d656468736965622f6c61726176656c2d6769742d6d616e616765723f7374796c653d736f6369616c)[![GitHub watchers](https://camo.githubusercontent.com/7d854d7d122a55ce19fb135ce744178dda6248f19cebadb3b2a1cd716b4efc77/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f77617463686572732f61686d656468736965622f6c61726176656c2d6769742d6d616e616765723f7374796c653d736f6369616c)](https://camo.githubusercontent.com/7d854d7d122a55ce19fb135ce744178dda6248f19cebadb3b2a1cd716b4efc77/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f77617463686572732f61686d656468736965622f6c61726176656c2d6769742d6d616e616765723f7374796c653d736f6369616c)

🔗 Links
-------

[](#-links)

- [GitHub Repository](https://github.com/ahmedhsieb/laravel-git-manager)
- [Packagist](https://packagist.org/packages/ahmedhsieb/laravel-git-manager)
- [Issue Tracker](https://github.com/ahmedhsieb/laravel-git-manager/issues)
- [Changelog](CHANGELOG.md)

💬 Feedback
----------

[](#-feedback)

If you have any feedback, please reach out to me at
-------------------------------------------------------------------------------

[](#if-you-have-any-feedback-please-reach-out-to-me-at-ahmedosama11702gmailcom)

**If you find this package helpful, please consider giving it a ⭐ on GitHub!**

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance74

Regular maintenance activity

Popularity7

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity42

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

3

Last Release

148d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/4761c3e4da1b9adb1028637bae3bb4b68689554d07fc3e7b5c285819fc30824f?d=identicon)[Ahmedhsieb](/maintainers/Ahmedhsieb)

---

Top Contributors

[![Ahmedhsieb](https://avatars.githubusercontent.com/u/110618751?v=4)](https://github.com/Ahmedhsieb "Ahmedhsieb (6 commits)")

---

Tags

laravelgitdeploymentversion controlgit-managerahmedhsieb

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/ahmedhsieb-laravel-git-manager/health.svg)

```
[![Health](https://phpackages.com/badges/ahmedhsieb-laravel-git-manager/health.svg)](https://phpackages.com/packages/ahmedhsieb-laravel-git-manager)
```

###  Alternatives

[timokoerber/laravel-one-time-operations

Run operations once after deployment - just like you do it with migrations!

6481.7M11](/packages/timokoerber-laravel-one-time-operations)[fadion/maneuver

Easily deploy Laravel projects via FTP or SFTP, using Git for versioning.

1729.1k](/packages/fadion-maneuver)[thecodeholic/laravel-hostinger-deploy

Laravel package for automated Hostinger deployment with GitHub Actions support

565.3k](/packages/thecodeholic-laravel-hostinger-deploy)[webklex/laravel-git-hook

Laravel Git Hook

191.2k](/packages/webklex-laravel-git-hook)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
