Skip to content

A git simple config switcher made with Node.js

Notifications You must be signed in to change notification settings

RonkZeDonk/gitsc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GitSC

GitSC (git switch config) is a simple git config switcher written in Node.js. The entire project sits around 150 lines of code and has no dependencies other than the Node.js file system library.

Installation

First make sure you have Node.js installed. You can install it from your package manager, using fnm, or similar tools such as n, nvm, etc.

Next clone the GitSC repository and add a symlink to the 'start' file in a folder that is in PATH.

Once gitsc is in PATH, you can run gitsc setup to setup GitSC. A symlink will be created from ~/.config/git/config to a file managed by GitSC.

Your old git config file will be moved to ~/.config/git/config.old and copied to GitSC. The config will be named default.

Here is the easiest way to install GitSC:

# Download GitSC
$ cd ~/.local/bin
$ git clone https://github.com/RonkZeDonk/gitsc
# Add gitsc to path
$ sudo ln -s $PWD/gitsc/start /usr/local/bin/gitsc
# Setup GitSC (make symlinks to new config)
$ gitsc setup

Usage

To use GitSC, place your named git configs in the $INSTALL_DIR/configs folder.

  • To list all available configs use gitsc list.
  • To use a config use gitsc use <CONFIG NAME>

About

A git simple config switcher made with Node.js

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published