0

Suppose I have configuration like the following:

[remote "origin"]
        [..]
[branch "main"]
        [..]
[remote "alternative-origin"]
        [..]
        mirror = true
[user]
        name = My Name
        email = [email protected]
        signingkey = mysigningkey
[commit]
        gpgsign = true

How do I set alternative-remote to use another set of user settings?

1 Answer 1

1

The user settings have nothing to do with your remote: they only affect the identity that is used in your commit messages. By the time git is communicating with a remote server, those commits already exist and have whatever user/email/etc you were using at the time.

Sign up to request clarification or add additional context in comments.

2 Comments

Mmmmh I see, then I need to reformulate my question and relate it to commits instead of remotes, do you agree?
You are welcome to edit your question to more fully describe what you're trying to do. Maybe we can provide some suggestions based on that information.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.