Open a task. Come back to your work.
Start from your repository's main worktree on a named branch. gji go --root takes you there. You should have
installed gji and loaded shell integration.
The goal is simple: open a separate working directory, then return to the files you left open. You don't need to commit or stash them to try this.
1. Note where you are
gji go --root
git branch --show-current
git status --short
Remember the branch and any modified files. If your worktree is clean, that's fine too.
2. Give a new task its own place
gji new feature/try-gji
Choose a different branch name if that one already exists. gji creates the
branch and worktree, runs supported dependency setup, and takes your shell to
the new directory. Setup may take time. Use --no-install to skip it for this
trial.
Check the new location:
pwd
git branch --show-current
You are now on feature/try-gji in its own directory. You can edit, run tests,
or open your editor here without changing files in the worktree you left.
3. Pick up where you left off
gji go --root
git status --short
You are back in the main worktree, on the branch noted in step 1. The modified files you noted in step 1 are still there.
Use gji go feature/try-gji to return to the trial worktree, or just gji go
to choose an open task.
4. Remove the trial directory when you're done
If you didn't leave any files you need in the trial worktree:
gji done feature/try-gji --keep-branch
This removes its working directory while retaining its branch. Review any
prompt before removing a worktree with changes. Uncommitted files aren't
recoverable through gji undo.
Next: a real interruption
While working on a feature, use a PR number from your repository:
Before leaving, visit your current worktree with gji go <branch> (use its actual branch name) so back has a recorded destination.
gji pr 1234
gji back
The PR opens in its own worktree; with the starting worktree recorded, back returns to it.
For a particular destination, use gji go <branch>.
Continue with daily workflow for editors, experiments, cross-repository navigation, and cleanup.