🚨 Shai-Hulud Strikes Again:834 Packages Compromised.Technical Analysis →
Socket
Book a DemoInstallSign in
Socket

gitinit

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gitinit

Create a new git repo based on an already existing repository

latest
Source
npmnpm
Version
1.0.1
Version published
Maintainers
1
Created
Source

gitinit

Create a new project based on an already existing repository

Install

npm i -g gitinit

Usage

Run gitinit followed by the repo url that is to be used as the basis of the new project. The program will go on to ask where to create the new project <username>/<repo>. Confirm this operation by entering a <password>; required so that the script can create the new repo on behalf of <username> via CURL.

gitinit electron/electron-quick-start

> into: lukejacksonn/neutron
> pass: •••••••••••••••••

Initialized lukejacksonn/neutron from electron/electron-quick-start

This procedure will create the folder ./neutron in the directory where the the command was ran, it will also have created the repository lukejacksonn/neutron on github. Both the local and remote clone contain a snapshot of electron/electron-quick-start with all git history squashed into an initial commit with the message Gitinit electron/electron-quick-start.

Procedure

Essentially the script runs the following commands:

  • Creates a new empty repository
  • Clones the basis repository
  • Removes the git history of the cloned repo
  • Reinitializes clone as a git repo
  • Makes an initial commit in the clone
  • Pushes the cleaned clone to the new repo

The code for these steps can be found in index.js

FAQs

Package last updated on 01 Mar 2017

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