Skip to content

Commit

Permalink
Updated documentation and added git-profile alias
Browse files Browse the repository at this point in the history
  • Loading branch information
dm3ch committed Jul 4, 2019
1 parent 0646c2c commit 2f50679
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 17 deletions.
6 changes: 4 additions & 2 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,11 @@ brews:
test: |
system "#{bin}/git-profile-manager", "--version"
install: |
bin.install "git-profile-manager"
system "#{bin}/git-profile-manager completion bash > bash_completion.bash"
system "#{bin}/git-profile-manager completion zsh > zsh_completion.zsh"
bash_completion.install "bash_completion.bash"
zsh_completion.install "zsh_completion.zsh"
ln_s "#{bin}/git-profile-manager", "#{bin}/git-profile", false
bin.install "git-profile-manager"
bin.install "git-profile"
30 changes: 15 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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/):
Expand All @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 2f50679

Please sign in to comment.