gitrees
TypeScript icon, indicating that this package has built-in type declarations

0.1.9 • Public • Published

Gitrees

npm version npm downloads License

Organize your local git repositories in a tree structure:

~/Projects
└── github
    └── <GitHub org / username>
        └── <GitHub repo name>

Kapture 2024-01-24 at 09.40.50

Why

This project is highly inspired by this post. You can read it for more information.

Usage

Install

npm install -g gitrees

init config

gt init

It will generate a config file named .gtrc.json on your home directory:

{
  // Alias for remote git repository address
  "alias": {
    "github.com": "github",
    "gitlab.com": "gitlab",
    "you-company.com": "company"
  },
  // Root directory for storing all local repositories.
  "root": "/Users/hostname/Projects"
}

Clone a repository

gt clone https://github.com/vuejs/core.git

Will convert to:

git clone https://github.com/vuejs/core.git /Users/hostname/Projects/github/vuejs/core

gt clone https://your-company.com/test/demo.git

Will convert to:

git clone https://your-company.com/test/demo.git /Users/hostname/Projects/company/test/demo

License

MIT License © 2023-PRESENT yuyinws

Readme

Keywords

Package Sidebar

Install

npm i gitrees

Weekly Downloads

1

Version

0.1.9

License

MIT

Unpacked Size

9.37 kB

Total Files

8

Last publish

Collaborators

  • yuyinws