PHPackages                             zeeshan/git-profile - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. zeeshan/git-profile

ActiveLibrary

zeeshan/git-profile
===================

Change git profile on the go

v2.1.1(9y ago)23312710MITPHPPHP &gt;=5.5.9

Since Sep 17Pushed 7y ago4 watchersCompare

[ Source](https://github.com/zeeshanu/git-profile)[ Packagist](https://packagist.org/packages/zeeshan/git-profile)[ RSS](/packages/zeeshan-git-profile/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependencies (5)Versions (6)Used By (0)

git-profile
===========

[](#git-profile)

Utility that helps you switch git configurations with ease

 [ ![Build Status](https://camo.githubusercontent.com/d186e74d7cfb46a92ec8bf26851cfc02b47ea2629fb70ef88a12efd9b3afd1ca/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f7a69697368616e65642f6769742d70726f66696c652f6d61737465722e7376673f7374796c653d666c61742d737175617265) ](https://travis-ci.org/ziishaned/git-profile) [ ![Latest Version](https://camo.githubusercontent.com/20e82d7bdaba9982f3ac7269d4902dfc62a15bf82095b363836c94759c09d4ea/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f7a69697368616e65642f6769742d70726f66696c652e7376673f7374796c653d666c61742d737175617265) ](https://github.com/ziishaned/git-profile/releases) [ ![](https://camo.githubusercontent.com/e1887d37276710dea176e81f603aaee177fc80cb7466c7ed3af3951e6e8e3a2c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f747769747465722d74776565742d626c75652e7376673f7374796c653d666c61742d737175617265) ](https://twitter.com/home?status=git-profile%20by%20%40ziishaned%20http%3A//github.com/ziishaned/git-profile) [ ![](https://camo.githubusercontent.com/bba2cc003f1b323c8fdcb7ec21f7ad7f0208abfad9845503d3fc220d6834e5a3/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f666565646261636b2d407a69697368616e65642d626c75652e7376673f7374796c653d666c61742d737175617265) ](https://twitter.com/ziishaned) [ ![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265) ](https://github.com/ziishaned/git-profile)

Preface
-------

[](#preface)

It is possible that you have multiple git configurations. For example:

```
; Office Profile
Name: John Doe
Email: johndoe@office.com

; Personal Profile
Name: John Doe
Email: johndoe@gmail.com

```

It could be a hassle to remember and switch between the profiles while working on different projects.

This utility aims to make this hassle free.

Features
--------

[](#features)

- Create and manage profiles globally; create once, use anywhere
- Set profile for a specific project
- Set global profile with a single command

This utility helps you save profiles and then you can switch between them using a single command.

Install
-------

[](#install)

```
$ composer global require zeeshan/git-profile

```

Then check your `$PATH` variable. It must contain `~/.composer/vendor/bin` dir.

```
$ echo $PATH

/usr/local/sbin:/usr/bin:/bin:/usr/sbin:/home/username/.composer/vendor/bin

```

Modify your `.zshrc` or `.bashrc` files if your `$PATH` variable not contain composer/bin dir.

```
export PATH=~/.composer/vendor/bin:$PATH

```

#### Also you can use .phar file

[](#also-you-can-use-phar-file)

- Download the file from [here](https://github.com/ziishaned/git-profile/releases/download/v1.0/git-profile)
- `sudo chmod -R 755 git-profile`
- `sudo mv git-profile /usr/local/bin/git-profile`

Usage
-----

[](#usage)

```
$ git-profile [options]

```

*Options*

```
-h, --help              Display this help message
-V, --version           Display this application version
--ansi                  Force ANSI output
--no-ansi               Disable ANSI output

```

*Commands*

```
rm                      Remove git profile
use                     Change git profile locally or globally
add                     Create a new git profile
show                    Show details for an existing profile
update                  Update details for an existing profile
current                 Gets the currently set profile
list                    List of profiles

```

Examples
--------

[](#examples)

Find some of the sample usages below

### Adding Profiles

[](#adding-profiles)

```
$ git-profile add

[+] Enter profile title: Office

[+] Enter Name: John Doe
[+] Enter Email: johndoe@office.com
[+] Enter Signingkey: B7156A83

[OK] Profile "Office" saved successfully

```

### Remove Git Profile

[](#remove-git-profile)

```
$ git-profile rm "Office"

[OK] Profile "Office" successfully removed

```

### Show Details for a profile

[](#show-details-for-a-profile)

```
$ git-profile show "Office"

[+] Name:  John Doe
[+] Email: johndoe@office.com
[+] Signingkey: B7156A83

```

### Updating Profile

[](#updating-profile)

```
$ git-profile update "Office"

[+] Enter Name: Jane Doe
[+] Enter Email: janedoe@gmail.com
[+] Enter Signingkey: 547ABB1C

[OK] Profile "Office" updated successfully

```

### Switching Profile

[](#switching-profile)

*Setting details locally i.e. set profile for the current project*

```
$ git-profile use "Office"

[OK] Switched to "Office"

```

*Setting details globally i.e. set global configuration*

```
$ git-profile use "Office" --global

[OK] Switched to "Office"

```

### Get Current Profile

[](#get-current-profile)

```
$ git-profile current

[+] Current Profile "Office"
[+] Name: John Doe
[+] Email: johndoe@gmail.com
[+] Signingkey: 547ABB1C

```

*Side note* It should be noted that profiles are maintained globally. When you `use` some profile locally, what it does is get the configuration for that profile and sets it for the current project. i.e. when `use` is run locally it is equivalent to

```
$ git config user.name "Name for specified profile"
$ git config user.email "email-for-specified@profile.com"
$ git config user.signingkey "SIGNINGKEY"

```

### Profiles List

[](#profiles-list)

```
$ git-profile list

Available profiles:
    Github
    Home
    Office

```

License
-------

[](#license)

MIT © Zeeshan Ahmad

###  Health Score

35

—

LowBetter than 79% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity28

Limited adoption so far

Community17

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

Top contributor holds 76.1% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~59 days

Total

4

Last Release

3350d ago

Major Versions

v1.0 → v2.02017-03-13

### Community

Maintainers

![](https://www.gravatar.com/avatar/93f670b66ad848731a36e428e51d2ba2e50f881121257b4ce3e8783344673f09?d=identicon)[zeeshanahmad](/maintainers/zeeshanahmad)

---

Top Contributors

[![ziishaned](https://avatars.githubusercontent.com/u/16267321?v=4)](https://github.com/ziishaned "ziishaned (67 commits)")[![j0k3r](https://avatars.githubusercontent.com/u/62333?v=4)](https://github.com/j0k3r "j0k3r (15 commits)")[![adam-paterson](https://avatars.githubusercontent.com/u/1008727?v=4)](https://github.com/adam-paterson "adam-paterson (4 commits)")[![Rpsl](https://avatars.githubusercontent.com/u/265634?v=4)](https://github.com/Rpsl "Rpsl (2 commits)")

---

Tags

gitgit-profilesmanageprofilegit

###  Code Quality

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/zeeshan-git-profile/health.svg)

```
[![Health](https://phpackages.com/badges/zeeshan-git-profile/health.svg)](https://phpackages.com/packages/zeeshan-git-profile)
```

###  Alternatives

[captainhook/captainhook

PHP git hook manager

1.1k6.8M370](/packages/captainhook-captainhook)[ramsey/conventional-commits

A PHP library for creating and validating commit messages according to the Conventional Commits specification. Includes a CaptainHook action!

1931.2M122](/packages/ramsey-conventional-commits)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
