Skip to content

git-clone(1) repositories into a pre-determined directory structure.

Notifications You must be signed in to change notification settings

teoljungberg/clone

Repository files navigation

clone

git-clone(1) repositories into a pre-determined directory structure.

Usage

Using the -n flag for demonstration:

% clone -n [email protected]:user/repository
git clone [email protected]:/user/repository /home/user/src/github.com/user/repository

or

% pwd
/home/user/src/github.com/user
% clone -n another-repository
git clone [email protected]:/user/another-repository /home/user/src/github.com/user/antother-repository

CDPATH

It is recommended to set the CDPATH environment variable to the different hosts you have repositories from. This allows for quick access and quick cloning due to the known directory structure of clone(1).

% CDPATH=$HOME/src/github.com
% cd user
~/src/github.com/user
% clone -n repository
git clone [email protected]:/user/repository /home/user/src/github.com/user/repository

Installation

UNIX

# make install

Nix

% nix-env -i -f .

Help

% man clone

About

git-clone(1) repositories into a pre-determined directory structure.

Resources

Stars

Watchers

Forks