Skip to content

davfive/gitspaces

Repository files navigation

GitSpaces

PyPI version Tests License: MIT Python 3.8+

Manage multiple independent clones of a git repository. Similar to ClearCase Views but for Git.

Work on multiple features, branches, or experiments simultaneously without branch switching overhead. Each "space" is an independent clone of your repository.

Features

  • Multiple independent clones per repository
  • Fast switching between workspaces
  • Inactive spaces can be put to "sleep"
  • Add more clones on demand
  • Direct editor integration

Installation

pip install gitspaces

Or from source:

git clone https://github.com/davfive/gitspaces.git
cd gitspaces
pip install -e .

Quick Start

Configure project paths and editor:

gitspaces setup

Clone a repository with multiple workspaces:

gitspaces clone https://github.com/user/repo.git -n 3

Creates:

projects/repo/
├── __GITSPACES_PROJECT__
├── main/          # active workspace
└── .zzz/          # sleeping workspaces
    ├── zzz-0/
    ├── zzz-1/
    └── zzz-2/

Basic operations:

gitspaces switch              # switch workspace
gitspaces sleep               # sleep active, wake another
gitspaces rename old new      # rename workspace
gitspaces extend -n 2         # add 2 more clones
gitspaces code                # open in editor

Commands

gitspaces setup                           # configure project paths, editor
gitspaces clone <url> [-n N] [-d DIR]     # clone repo with N workspaces
gitspaces switch [SPACE]                  # switch workspace (interactive if no arg)
gitspaces sleep [SPACE]                   # sleep workspace, optionally wake another
gitspaces rename OLD NEW                  # rename workspace
gitspaces extend -n N [SOURCE]            # add N more clones
gitspaces code [SPACE]                    # open workspace in editor
gitspaces config [KEY] [VALUE]            # view/set configuration

Configuration

Default location: ~/.gitspaces/config.yaml

project_paths:
  - /home/user/projects
default_editor: code

Contributing

See CONTRIBUTING.md.

Deployment

Maintainers: see README.DEPLOYMENT.md for PyPI deployment.

License

MIT - see LICENSE.

About

No description, website, or topics provided.

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •