Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

git-cd

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

git-cd

👷 cd dir after git clone if not exist

  • 0.2.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

git-cd

Build Status NPM version JavaScript Style Guide

👷 cd dir after git clone if not exist

Installation

$ npm i git-cd -g

Usage

$ git-cd <repoUrl>

Set up BASE directory:

$ git config --global ghq.root THE_PATH_YOU_WANT

By default, the repository is cloned via SSH protocol. Or you can pass --inherit-url flag to disable it.

Required

motemen/ghq: Remote repository management made easy

go get github.com/motemen/ghq

How it works

  1. Clone a remote repository under the BASE directory. Just like git clone.
  2. Run hook if exists. (Optional)
  3. Change current directory to cloned repository with the shell.

Hook

Put file in ~/.git-cd/hook.js , and write anything in nodo.js.

Example:

$ mkdir -p ~/.git-cd
$ echo "console.log('hook receives:', process.argv[2])" > ~/.git-cd/hook.js

Directory Structures

$BASE
├── github.com
│   └── foo
│       └── bar
└── gitlab.com
    └── foo
        └── bar

License

MIT License © viko16

Keywords

FAQs

Package last updated on 07 Jul 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc