(no title)
Kwpolska | 9 days ago
~/.ssh/config
Host github.com-work
HostName github.com
User git
IdentityFile ~/.ssh/work_id_rsa
IdentitiesOnly yes
~/.git/config [user]
email = work@example.com
[remote "origin"]
url = github.com-work:Work/Widget.git
embedding-shape|9 days ago
In my main ~/.gitconfig I have:
Where basically `projects/` follow GitHub naming with $user/$repo, so I set the git identity based on all projects within that user, rather than repo-by-repo which would get cumbersome fast.Then you just make sure you're in the right directory :)
beaker52|9 days ago
The next step of this problem space is: “when I’m working on project X, I often forget to change my GitHub user with Gitas” so now they need direnv or something to switch it for them. The original solution foresaw this - so is far more complete that Gitas already _and_ built into git itself.
But, LLMs, so here we are, slowly drowning in a growing ocean of software built by the unaware.
accoil|9 days ago
arccy|9 days ago
unknown|9 days ago
[deleted]
xn|9 days ago
StarlaAtNight|9 days ago
embedding-shape|9 days ago
Is there any good reasons not to separate what you work on into multiple GitHub accounts? Not to mention some people don't want all their projects attached to one profile, some people also develop in their free-time, and don't want to mix freetime/work projects under the same user account, for multiple reasons.
Hamuko|9 days ago
magicalhippo|9 days ago
If they used their personal account for both, it could be unclear if they speak on behalf of our company or not.
jimmydoe|9 days ago
B if you ever be in a company using the half baked GitHub hosted enterprise….
hrpnk|9 days ago
source: https://erik.doernenburg.com/2017/12/using-multiple-github-a...
CamJN|9 days ago
OrderlyTiamat|9 days ago
You're presumably joking? If not, could you elaborate?
PunchyHamster|9 days ago
Tho I prefer to just use hardware key for ssh
jimmydoe|9 days ago
- using alternative host is not supported when roaming between local and cloud, fix is to add another origin you don’t use but use GitHub.com url
- CC uses gh command, which still needs account switch, this can be solved by add the switch to CC hook.
adithyassekhar|9 days ago
trueismywork|8 days ago