GitSpaces is a structured folder/directory system for working concurrently on independent parallel development tasks within and across multiple proects.
For those of you with experience using, ahem, the ClearCase vcs, you're familiar with the concept of ClearCase Views. GitSpaces is clearcase view for git projects.
A GitSpace is an isolated workspace that has all of your project code where you can work on ONE THING. A GitSpace project is a collection of spaces (think independent clones) for the project. If you are asked to fix a bug or something else in parallel, you just open a new space and work there.
$ go install github.com/davfive/gitspaces/v2@latest
-> installs to ~/go/bin/gitspaces
$ gitspaces -v # to be change to gitspaces setup
-> run once to install config and shell wrapper files to ~/.gitspaces/ (or C:/Users/<user>/.gitspaces/
Setup gitspaces command wrapper
Some gitspaces commands change the current working directory of the user. To accomplish this, gitspaces is run through a shell (bash / powershell) wrapper.
MacOS
bash
$ echo ". ~/.gitspaces/gitspaces.sh" >> ~/.bashrc # main wrapper
$ echo "alias gs=gitspaces" >> ~/.bashrc # optional alias
PowerShell
$ open
$ vim ~/.gitspaces/config.yaml
-> update ProjectPaths list
$ vim ~/.bashrc (or ~/.zshrc)
-> add '. ~/.gitspaces/shellfunction.sh'
-> add 'alias gs=gitspaces' (optional)
$ . ~/.bashrc (or ~/.zshrc)
Create a GitSpace project
$ cd /path/to/one/of/ProjectPaths
$ gitspaces create REPO_URL
-> creates project and cd's into space
Start using GitSpaces
Commands
The gitspaces command
USAGE
gitspaces COMMANDSimplify your life with alias gs=gitspaces.
WHERE
COMMAND
Description
create
Creates a new GitSpace project from a git repo url
switch
Switch spaces. Default, same as gitspaces w/o a command.
rename
Rename a current gitspace
sleep
Archive a gitspace and wakes up another one
code
Launches Visual Studio Code Workspace for the space
# Created first time gitspaces is run
~/.gitspaces/
├── config.yaml (must be filled in before use)
├── gitspaces.sh
├── gitspaces.cygwin.sh
├── gitspaces.ps1
└── gitspaces.scriptblock.ps1