Coder Social home page Coder Social logo

git-profile's Introduction

git-profile

A POSIX-compliant implementation of git-profile subcommand

Installation

$ curl -sSL -o /usr/local/bin/git-profile https://git.io/git-profile && chmod +x /usr/local/bin/git-profile

Uninstallation

$ rm /usr/local/bin/git-profile

Configuration

git-profile reads profiles from the shell file ~/.gitprofiles ( can be controlled by setting the GIT_PROFILES environment variable), profiles are functions start with profile_, below is a sample which has two profiles (profile1 and profile2):

#!/usr/bin/env sh

# For more information about customizing git at
# https://git-scm.com/book/en/v2/Customizing-Git-Git-Configuration
profile_profile1() {
  git config user.name "profile1"
  git config user.email "[email protected]"
}

profile_profile2() {
  git config user.name "profile2"
  git config user.email "[email protected]"
}

In addition, below config is recommended for Git (more information):

$ git config --global user.useConfigOnly true

Usage

$ git profile -h
usage: git profile [options] [profile_name]

Options:
  -h                      Print help information
  -l, --list              List all profiles
      --version           Print version information

Examples:
  1. List all profiles    $ git profile -l
  2. Switch to a profile  $ git profile profile1

Change Log

See CHANGELOG here

git-profile's People

Contributors

eugnma avatar

Watchers

 avatar

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.