▲ | powersnail 3 months ago | |||||||
I do something similar, but instead of `insteadOf`, I just clone the repo with `gh-work:org/repo`, and in the git config:
So, any git repo cloned with the ssh identity defined under `gh-work` will take on the config of `gh-work.inc`, which includes the git identity, and also the same signing key as in the ssh config.Essentially, the name `gh-work` becomes the distinguishing element in both my ssh identity and my git identity, and I find this easier to think about. | ||||||||
▲ | TeMPOraL 3 months ago | parent | next [-] | |||||||
Thank you. The article left me uneasy, in OCD sense, about the solution having more degrees of freedom than it needs. I was wondering how to trim it down to one runtime parameter, and yours is an elegant way to do it. | ||||||||
▲ | shaicoleman 3 months ago | parent | prev | next [-] | |||||||
Please note that includeIf is case sensitive, and the order of precedence is last one wins. To check if it's working correctly you can run:
| ||||||||
▲ | qmmmur 3 months ago | parent | prev [-] | |||||||
In my experience scripts that expect your remote to be a certain way will break with this approach. | ||||||||
|