Skip to content

Auto update CLI & Global .gitconfig when switching auth

License

Notifications You must be signed in to change notification settings

khaled-0/gh-authswap

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

gh-authswap

gh-authswap is a GitHub CLI extension that allows you to switch authentication contexts and automatically update your .gitconfig with the correct user name and email.

Features

  • Switch between multiple GitHub authentication contexts.
  • Automatically fetch and update your .gitconfig with the current user's name and email.
  • Simplifies managing multiple GitHub profiles (e.g., work and personal).

Installation

To install the gh-authswap extension, run this:

```sh
gh extension install khaled-0/gh-authswap
```

Usage

To switch authentication contexts and update your .gitconfig, use the following command:

gh authswap

To switch to a work context:

gh authswap work

Or to switch to a personal context:

gh authswap personal

Notes

Contributing

Contributions are welcome! Please open an issue or submit a pull request with your changes.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Contact

For any questions or support, please open an issue on the repository.

About

Auto update CLI & Global .gitconfig when switching auth

Topics

Resources

License

Stars

Watchers

Forks

Languages