Skip to content

Layzie/gitconfig-setter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

The command line tool for setting local *user.name* and *user.email* of git.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages