gitconfig-setter

command module
v0.0.0-...-e6d7597 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 10, 2015 License: MIT Imports: 6 Imported by: 0

README

gitconfig-setter

Demo

asciicast

What's this?

This command (gitconfig-setter) sets local user.name and user.email of git.

You can set GitHub account in git global config, and set GHE account in git local config.

Usage

The command is avelable on Mac. Other os needs go build main.go.

Install
go install github.com/Layzie/gitconfig-setter

or

download command.

Make config file

Make config.toml such as:

name = "YOUR NAME" # local git config: user.name
email = "your@example.com" # local git config: user.email
Run command
$ cd /path/to/set/config
$ git config --local -l
core.repositoryformatversion=0
core.filemode=true
core.bare=false
core.logallrefupdates=true
core.ignorecase=true
$ cd /path/to/gitconfig-setter
$ gitconfig-setter /path/to/repository /path/to/config
2015/08/07 18:41:13 ./'s local git config name has changed! Using ./config.toml
2015/08/07 18:41:13 ./'s local git config email has changed! Using ./config.toml
$ git config --local -l
core.repositoryformatversion=0
core.filemode=true
core.bare=false
core.logallrefupdates=true
core.ignorecase=true
user.name=YOUR NAME
user.email=your@example.com

LICENCE

MIT

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL