Coder Social home page Coder Social logo

change-git-user's Introduction

cgu

Crates.io Crates.io CI

Manage multiple git configurations

Inspired by Git-User-Switch.

Installation

# this will install the executable `cgu` and `git-change-user`
cargo install change-git-user

# enable only the cli
cargo install --no-default-features --features=cli change-git-user

# enable only prompts
cargo install --no-default-features --features=prompts change-git-user

Features

  • Switch user.name and user.email config
  • Assign an optional user.signingKey to the config
  • Give the config a name to remember it by (e.g. "Work" or "Personal")
  • Uses git2 to discover a repository and manipulate its config

Usage

NOTE You can use cgu and git change-user interchangeably.

Prompts

# This will spawn prompts to guide you through managing user configurations
cgu

CLI

If you don't want use use prompts, you can use subcommands instead. The subcommands are:

  • add
  • select
  • delete
  • view

Examples

# view CLI options
cgu --help

# view subcommand help
cgu <subcommand> --help

# Add a config with the name "My Config"
# Defaults to the user.name value ("My Name" in this example) if --name is not passed
cgu add --name "My Config" "My Name" [email protected]

# View all configs
cgu view --all

# Select the new config
cgu select "My Config"

# Delete the new config
cgu delete "My Config"

change-git-user's People

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

change-git-user's Issues

Empty list of items error

When the config data is empty, but the file still exists, an empty set of choices is passed to the
select and delete actions, causing an error.

Add CLI

In case user doesn't want to bother with the question/answer format

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.