forked from dotzero/git-profile
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updated documentation and added git-profile alias
- Loading branch information
Showing
2 changed files
with
19 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,10 +2,13 @@ | |
|
||
[![CircleCI](https://circleci.com/gh/Dm3Ch/git-profile-manager.svg?style=svg)](https://circleci.com/gh/Dm3Ch/git-profile-manager) | ||
[![Go Report Card](https://goreportcard.com/badge/github.com/Dm3Ch/git-profile)](https://goreportcard.com/report/github.com/Dm3Ch/git-profile-manager) | ||
[![MIT License](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/dotzero/git-profile/blob/master/LICENSE) | ||
[![MIT License](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/Sm3Ch/git-profile-manager/blob/master/LICENSE) | ||
|
||
Git Profile allows to add and switch between multiple user profiles in your git repositories. | ||
|
||
This tool is uses git config includes, so if you change profile you'll change all configs that includes this profile. | ||
Also profiles could contain not only `user.name`, `user.email`, `user.signingkey`, but any git config key. | ||
|
||
## Installation | ||
|
||
If you are OSX user, you can use [Homebrew](http://brew.sh/): | ||
|
@@ -16,13 +19,13 @@ brew install dm3ch/tap/git-profile-manager | |
|
||
### Prebuilt binaries | ||
|
||
Download the binary from the [releases](https://github.com/dotzero/git-profile/releases) page and place it in `$PATH` directory. | ||
Download the binary from the [releases](https://github.com/dm3ch/git-profile-manager/releases) page and place it in `$PATH` directory. | ||
|
||
### Building from source | ||
|
||
If your operating system does not have a binary release, but does run Go, you can build from source. | ||
|
||
Make sure that you have Go version 1.11 or greater and that your `GOPATH` env variable is set (I recommend setting it to `~/go` if you don't have one). | ||
Make sure that you have Go version 1.12 or greater and that your `GOPATH` env variable is set (I recommend setting it to `~/go` if you don't have one). | ||
|
||
```bash | ||
go get -u github.com/dm3ch/git-profile-manager | ||
|
@@ -35,26 +38,23 @@ The binary will then be installed to `$GOPATH/bin` (or your `$GOBIN`). | |
Add an entry to a profile | ||
|
||
```bash | ||
git profile add home user.name dotzero | ||
git profile add home user.email "[email protected]" | ||
git profile add home user.signingkey AAAAAAAA | ||
$git profile-manager add test-profile 1|0 ↵ 03:30:56 | ||
Name: Test Name | ||
Email: [email protected] | ||
Signing Key: | ||
Profile test-profile added successfully | ||
``` | ||
|
||
List of available profiles | ||
List of available profiles: | ||
|
||
```bash | ||
git profile list | ||
git profile-manager list | ||
``` | ||
|
||
Apply the profile to current git repository | ||
Apply the profile to current git repository: | ||
|
||
```bash | ||
git profile use home | ||
|
||
# Under the hood it runs following commands: | ||
# git git config --local user.name dotzero | ||
# git git config --local user.email "[email protected]" | ||
# git git config --local user.signingkey AAAAAAAA | ||
git profile-manager use home | ||
``` | ||
|
||
## License | ||
|