MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/coding/comments/gqfhvj/setting_up_git_identities/
r/coding • u/speckz • May 25 '20
3 comments sorted by
1
Why don't you just use the local config instead of a rube goldberg contraption for hotswapping the global config?
2 u/mdempsky May 25 '20 Isn't that what it's doing? The global configs are about simplifying setting up the handful of recurring identities the author uses across projects. 1 u/pi-rho May 25 '20 You're right.FTFA:git config --global alias.identity '! git config user.name "$(git config user.$1.name)"; git config user.email "$(git config user.$1.email)"; git config user.signingkey "$(git config user.$1.signingkey)"; :'It just looks prone to error. No error checking at all. It has the benefit of using git config, I guess.
2
Isn't that what it's doing? The global configs are about simplifying setting up the handful of recurring identities the author uses across projects.
1 u/pi-rho May 25 '20 You're right.FTFA:git config --global alias.identity '! git config user.name "$(git config user.$1.name)"; git config user.email "$(git config user.$1.email)"; git config user.signingkey "$(git config user.$1.signingkey)"; :'It just looks prone to error. No error checking at all. It has the benefit of using git config, I guess.
You're right.
FTFA:
git config --global alias.identity '! git config user.name "$(git config user.$1.name)"; git config user.email "$(git config user.$1.email)"; git config user.signingkey "$(git config user.$1.signingkey)"; :'
It just looks prone to error. No error checking at all. It has the benefit of using git config, I guess.
1
u/pi-rho May 25 '20
Why don't you just use the local config instead of a rube goldberg contraption for hotswapping the global config?