[PYTHON] Script to use multiple github accounts properly in the same repository on the same machine

Introduction

In my organization, multiple programmers are developing with shared accounts in the robot.

I recently started managing the source code on GitHub, but note that user management when committing was a little troublesome when developing in the same repository in the robot.

I want to switch between multiple accounts within the same repository, but when I looked it up, I could only find a way to set it for each repository.

Since users change frequently, it is troublesome to rewrite gitconfig each time, and it seems to be forgotten.

solution

I wrote a script to check committers before committing.

The source code can be found here [https://github.com/DaikiMaekawa/git-check-committer).

how to use

Commit normally.

$ git commit -m "msg"

Account information is displayed

Set up a new account.

Username:NEW_USER_NAME
Email:NEW_USER_EMAIL
Please commit that again...

You will be asked to commit again.

$ git commit -m "msg"

Check the updated account information and enter y if there is no problem.

Author = NEW_USER_EMAIL <NEW_USER_EMAIL>

Recommended Posts

Script to use multiple github accounts properly in the same repository on the same machine
Survey on the use of machine learning in real services
Notes on how to use marshmallow in the schema library
How to handle multiple versions of CUDA in the same environment
I made a POST script to create an issue on Github and register it in the Project
Clone the github repository on jupyter notebook
Use dHash to locate on the course from a scene in a racing game
Visualize the timeline of the number of issues on GitHub assigned to you in Python
How to use the C library in Python
Easily log in to AWS with multiple accounts
Building multiple Python environments on the same system
Use pygogo to get the log in json.
A memorandum on how to use keras.preprocessing.image in Keras
How to use the exists clause in Django's queryset
How to use the model learned in Lobe in Python
I want to use the R dataset in python
Extract each Location from Stargazers in the Github repository
How to register the same data multiple times with one input on the Django management screen
How to use GitHub on a multi-person server without a password
How to use the __call__ method in a Python class
[Hyperledger Iroha] Notes on how to use the Python SDK
How to use VS Code in venv environment on windows
Use pyOCR to convert the description on the card into text
If you want your colleagues to use the same language
I tried changing the python script from 2.7.11 to 3.6.0 on windows10
I tried to summarize how to use the EPEL repository again
When you want to use multiple versions of the same Python library (virtual environment using venv)