Skip to content

0byte-coding/shgit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

shgit

Git but a bit "shit" - personal overlay for git projects.

Store project-specific files (configs, env templates) that can't be committed to target repo but should be git-versioned in your private repo.

Features

  • shgit clone <url> - Clone repo as submodule into <reponame>_shgit/repo/
  • shgit link - Symlink files from link/ into repo, add to local gitignore
  • shgit worktree add <name> - Create worktree with proper symlinks
  • Config-based env file syncing between main repo and worktrees

Structure

foorepo_shgit/
  link/                 # Your tracked files (mirrors repo structure)
    .vscode/settings.json
    .opencode/opencode.json
  repo/                 # Git submodule (target repo)
  .shgit/config.json    # shgit configuration
  .gitignore
  .gitmodules

Usage

shgit clone https://github.com/user/foorepo.git
cd foorepo_shgit
mkdir -p link/.vscode
echo '{}' > link/.vscode/settings.json
shgit link

Installation

Distributions

Currently only available on the arch linux aur

yay -S shgit-bin

Manual user only install

Ensure ~/.local/bin is in your PATH before proceeding

tmp=$(mktemp -d) && \
  curl -L https://github.com/0byte-coding/shgit/releases/latest/download/shgit-x86_64-linux-gnu.tar.gz | tar -xz -C "$tmp" --overwrite && \
  mkdir -p ~/.local/bin && \
  mv "$tmp/shgit" ~/.local/bin/ && \
  chmod +x ~/.local/bin/shgit && \
  rm -rf "$tmp"

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages