Skip to content

ahmadawais/gsubmodule

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gsubmodule

Convert folders to git submodules with separate repos.

Install

npm install -g gsubmodule

Usage

# Interactive mode
gsubmodule convert

# With options
gsubmodule convert --folder packages/studio --name studio --visibility private

# Short alias
gsub convert -f packages/studio -n studio -v private

Commands

convert

Convert a folder to a git submodule.

Option Description Default
-f, --folder <path> Folder path to convert (interactive)
-n, --name <name> Repository name folder basename
-v, --visibility <type> Repository visibility (public/private) private

Requirements

  • GitHub CLI (gh) installed and authenticated
  • Git repository initialized in current directory

How it works

  1. Creates a temporary repository from the folder contents
  2. Creates a new GitHub repository
  3. Removes the folder from the main repo
  4. Adds it back as a git submodule
  5. Cleans up temporary files

License

MIT

About

Convert folders to git submodules with separate repos.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published