A
A
Andrey Titov2016-09-05 17:47:08
git
Andrey Titov, 2016-09-05 17:47:08

How to switch between git users?

On a computer it is necessary to work on behalf of two users. How to quickly switch settings without reconfiguring?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
Mikhail Osher, 2016-09-05
@miraage

Aliases.

alias git1="git -c user.name=foo"
git1 push origin master

alias git2="git -c [email protected]"
git2 push origin master

A
aol-nnov, 2016-09-05
@aol-nnov

if on behalf of different users in different turnips (each repository has its own user), then you need to do git config (not --global) in each of them and that's it.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question