Skip to content

idea2app/Git-utility

Repository files navigation

Git utility

A Git utility CLI tool with some missing sub commands

NPM Dependency CI & CD

NPM

Installation

npm i git-utility -g

or run with npx / pnpx directly:

npx git-utility # your arguments here

Usage

Download folders or files from Git repositories

# Download entire repository to current directory
xgit download https://github.com/your-org/your-repo

# Download from specific branch
xgit download https://github.com/your-org/your-repo main

# Download specific folder or file
xgit download https://github.com/your-org/your-repo main path/to/your-folder/or-file

# Download to a specific local path
xgit download https://github.com/your-org/your-repo main path/to/your-folder/or-file ./local-destination

Upload folders to Git repositories

# Upload a folder to a Git repository on a specific branch (force push)
xgit upload path/to/source-folder https://github.com/your-org/your-repo target-branch

# Upload to a specific directory in the repository (non-force push)
xgit upload path/to/source-folder https://github.com/your-org/your-repo target-branch target/directory

Manage Git submodules

# List current submodules
xgit submodule remove

# Remove a specific submodule
xgit submodule remove path/to/submodule

Commands

  • xgit download <GitURL> [branchName] [folderOrFilePath] [targetFolder] - Download folders or files from a Git repository
  • xgit upload <sourceFolder> <GitURL> <targetBranch> [targetFolder] - Upload a folder to a Git repository
  • xgit submodule remove [path] - Remove a Git submodule

About

A file/folder downloader based on Git CLI, TypeScript & Node.js

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published