glone

0.2.0 • Public • Published

glone

One file long missing post-clone hook utility for git clone.

  • Run script after cloning is completed.
  • Auto install git hooks.

Usage

Create .glone file in your repository.

{
  "install": "install.sh",
  "hooks": {
    "pre-commit" : "./pre-commit.js"
  }
}

Your scripts can be any kind of file as long as have correct shebang in it.

install.sh

#!/bin/bash
echo "I'm running after cloning."

pre-commit.js

#! /usr/bin/env node
console.log('No commit for ya!')
process.exit(1);

Thats it!

Now when you're going to clone repo, just use npx glone instead of git clone.

npx glone <repository> [directory] -- [other git clone arguments]

Repository mandatory but directory and other git clone arguments are optional of course.

or install glone globally and use standalone.

npm i glone -g glone <repository> [directory] -- [other git clone arguments]

Try it with this repo:

npx glone git@github.com:ramesaliyev/glone.git

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
0.2.00latest

Version History

VersionDownloads (Last 7 Days)Published
0.2.00
0.1.01

Package Sidebar

Install

npm i glone

Weekly Downloads

1

Version

0.2.0

License

ISC

Unpacked Size

3.35 kB

Total Files

6

Last publish

Collaborators

  • ramesaliyev