> ## Content Index
> Fetch the complete content index at: https://www.kenst.com/llms.txt
> Use this file to discover other available public pages before exploring further.

# Split Your Commits: Work vs. Personal GitHub
- URL: https://www.kenst.com/split-your-commits-work-vs-personal-github/
- Published: 2026-06-18T01:08:51.000Z
- Updated: 2026-06-18T01:08:51.000Z
- Description: A straightforward way to split commits between work and personal GitHub accounts.
- Author: Chris Kenst
- Tags: Tutorials, Git

It’s increasingly common for individuals to have multiple GitHub accounts. You might have one tied to your work email and another that’s tied to your personal email.

![](https://storage.ghost.io/c/64/2d/642d9fac-06bc-48ce-a22c-14219bd777e6/content/images/2026/06/ScreenRecording2026-06-17at5.55.52PM-ezgif.com-optimize.gif)

My personal GitHub profile

When you live in this world, it makes sense to configure your computer to support both GitHub accounts based on the kind of work you are doing. Any changes to work repos should use the work account, while contributions to open source projects or using your favorite agent harness configs will come from your personal account.

The most straightforward solution is to create a config that specifies your work and personal account details. Then when you download (clone) a repo, you simply tell the repo which account to use.

## Generate Two SSH Keys

The first step is to generate SSH keys for your separate GitHub accounts. These act as secret passwords that your computer will use when authenticating.

```bash
ssh-keygen -t ed25519 -C "work@email.com" -f ~/.ssh/id_rsa_work

ssh-keygen -t ed25519 -C "personal@email.com" -f ~/.ssh/id_rsa_personal
```

## Add Keys to GitHub

Copy the contents of each `.pub` file and add them to the SSH and GPG Keys section of your respective GitHub accounts.

## Create a Config File

In the `.ssh` folder create a text file called `config` and add:

```bash
# Personal Account
Host github-personal
    HostName github.com
    User git
    IdentityFile ~/.ssh/id_rsa_personal
    IdentitiesOnly yes

# Work Account    
Host github-work
    HostName github.com
    User git
    IdentityFile ~/.ssh/id_rsa_work
    IdentitiesOnly yes
```

## Clone repos using the Alias

Instead of `git clone git@github.com:org/repo.git` use `git clone git@github-work:org/repo.git`

Which means if we are cloning down [TestingConferences.org](http://testingconferences.org/?ref=kenst.com) (my favorite example) it looks like this:

`git clone git@github-personal:TestingConferences/testingconferences.github.io.git`

This automatically configures the repo to use the Personal Account’s SSH configuration. 

## Check your name and email

To ensure your personal commits show up under your personal email and name, navigate to your personal repo and run this command once:

```bash
git config user.email "personal@email.com"
git config user.name "Chris Kenst"
```

This sets the email locally for just that repository, keeping your work email safely confined to your company's repos.

## Set and Forget

This setup takes minutes to configure but saves you from the constant headache of messing with HTTPS credentials or accidentally pushing changes from the wrong account. Once it's done, you can seamlessly jump between work and open-source contributions without missing a beat!