Skip to content

XeroHero/srctree-linux

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

9 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

SRCTree Linux

A powerful Git GUI client for Linux, inspired by SourceTree for macOS/Windows.

Version License

๐Ÿš€ Features

  • Multi-tab Repository Support - Work with multiple repositories simultaneously
  • Visual Commit History - Beautiful branch graph visualization
  • Working Copy Management - Stage, unstage, and commit changes with ease
  • Diff Viewer - View file changes with syntax highlighting
  • Branch Operations - Create, merge, and switch branches
  • Remote Operations - Push, pull, and fetch from remotes
  • Stash Management - Save and apply work in progress
  • Tag Management - Create and view tags
  • Bookmark System - Quick access to recent repositories

๐Ÿ“ธ Screenshots

Welcome Screen

Clean interface to open, clone, or create repositories with recent bookmarks.

Commit History

Visual branch graph with detailed commit information.

Working Copy

Intuitive file staging area with status indicators.

๐Ÿ› ๏ธ Technology Stack

  • Electron 33 - Desktop application framework
  • React 18 - Modern UI library
  • Vite 6 - Lightning-fast build tool
  • simple-git 3.x - Pure Node.js Git library
  • electron-builder - Application packaging

๐Ÿ“ฆ Installation

Prerequisites

  • Node.js 18+ or npm/yarn
  • Git installed on your system

Setup

# Clone the repository
git clone <your-repo-url>
cd sourcetree-linux

# Install dependencies
npm install
# or
yarn install

๐Ÿƒ Running the Application

Development Mode

# Terminal 1: Start Vite dev server
npm run dev

# Terminal 2: Start Electron
npm run electron:dev

Production Build

# Build the React application
npm run build

# Package as AppImage
npm run dist

The AppImage will be created in the release/ directory.

๐Ÿ“– Usage Guide

Opening a Repository

  1. Open Existing: Browse and select a Git repository folder
  2. Clone: Enter a remote URL and destination path
  3. Create New: Initialize a new Git repository

Working with Changes

  1. Navigate to "Working Copy" in the sidebar
  2. Stage individual files or use "Stage All"
  3. Click "Commit" in the toolbar to commit changes
  4. Write your commit message and confirm

Managing Branches

  • Create: Click "Branch" in toolbar and enter a name
  • Switch: Click on any branch in the sidebar
  • Merge: Click "Merge" and select a branch to merge

Remote Operations

  • Push: Share your commits with remote repository
  • Pull: Fetch and merge changes from remote
  • Fetch: Download remote changes without merging

๐Ÿ—๏ธ Architecture

Security Pattern

The application uses Electron's recommended security pattern:

  • contextBridge: Secure IPC communication
  • contextIsolation: Renderer process isolation
  • No nodeIntegration: Enhanced security

IPC Handlers

All Git operations run in the main process via IPC handlers:

  • Repository operations (clone, init, status, log)
  • File operations (stage, unstage, commit, discard)
  • Branch operations (create, delete, checkout, merge)
  • Remote operations (push, pull, fetch)
  • Stash operations (save, apply, drop, list)
  • Tag operations (create, list)

Component Structure

src/
โ”œโ”€โ”€ App.jsx                    # Main application
โ”œโ”€โ”€ components/
โ”‚   โ”œโ”€โ”€ WelcomeScreen.jsx     # Landing page
โ”‚   โ”œโ”€โ”€ RepositoryView.jsx    # Main repo interface
โ”‚   โ”œโ”€โ”€ CommitHistory.jsx     # Commit log
โ”‚   โ”œโ”€โ”€ WorkingCopy.jsx       # File staging
โ”‚   โ”œโ”€โ”€ DiffViewer.jsx        # Diff display
โ”‚   โ””โ”€โ”€ dialogs/              # Action dialogs
โ”‚       โ”œโ”€โ”€ BranchDialog.jsx
โ”‚       โ”œโ”€โ”€ CommitDialog.jsx
โ”‚       โ”œโ”€โ”€ MergeDialog.jsx
โ”‚       โ””โ”€โ”€ ...

๐Ÿ“ Project Structure

sourcetree-linux/
โ”œโ”€โ”€ main.js                   # Electron main process
โ”œโ”€โ”€ preload.js                # IPC bridge
โ”œโ”€โ”€ index.html                # Entry HTML
โ”œโ”€โ”€ package.json              # Dependencies
โ”œโ”€โ”€ vite.config.js            # Vite config
โ”œโ”€โ”€ README.md                 # This file
โ”œโ”€โ”€ PROJECT_SUMMARY.md        # Detailed documentation
โ”œโ”€โ”€ sourcetree-linux-source.zip  # Source code archive
โ””โ”€โ”€ src/                      # React application
    โ”œโ”€โ”€ main.jsx
    โ”œโ”€โ”€ App.jsx
    โ”œโ”€โ”€ App.css
    โ””โ”€โ”€ components/

๐ŸŽจ Theme

SourceTree-inspired professional theme:

  • Clean light interface
  • Purple gradient accents
  • Color-coded status indicators
  • Intuitive iconography

๐Ÿ”ฎ Roadmap

Future Enhancements

  • x86_64 and .deb packages
  • Git flow integration
  • SSH key management
  • Conflict resolution UI
  • Settings panel
  • Search in history
  • File history view
  • Blame viewer
  • Submodule support

๐Ÿค Contributing

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

๐Ÿ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

๐Ÿ™ Acknowledgments

๐Ÿ“ง Support

For issues, questions, or suggestions, please open an issue on GitHub.


Made with โค๏ธ for the Linux community

About

Finally a git client that works well for Linux

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors