Before vs After Multi-SSH

Before

  • Check every remote before push
  • Rewrite origin URLs when switching accounts
  • Accidentally push with wrong identity

After

  • Use stable host aliases per account
  • Clone once, keep working without reconfiguration
  • Push confidently with deterministic identity mapping

Use Case 1: Personal and Work GitHub on Same Machine

Clone each repository with a dedicated host alias and never touch remote URLs again.

# personal project
 git clone git@github-personal:yourname/dotfiles.git

 # work project
 git clone git@github-work:your-org/platform-api.git

 # daily usage stays normal
 cd platform-api
 git pull
 git push

Use Case 2: Avoid Remote Rewrite During Context Switching

When you jump between client repos all day, alias-based remotes prevent repetitive fixes.

# no need for repeated remote set-url
 git remote -v
 # origin git@github-client-a:client-a/web-app.git

 # just branch and push
 git checkout -b feat/payment-audit-log
 git push -u origin feat/payment-audit-log

Use Case 3: Same Repo Name Across Accounts

If you have website in personal and company accounts, host aliases make the target explicit and safe.

# personal website
 git clone git@github-personal:yourname/website.git website-personal

 # company website
 git clone git@github-work:company/website.git website-work

Use Case 4: Multi-Provider Workflow (GitHub + GitLab + Bitbucket)

Use provider-specific aliases and keep one predictable pattern everywhere.

git clone git@github-work:team/service-api.git
 git clone git@gitlab-client:client/mobile-backend.git
 git clone git@bitbucket-legacy:ops/infra-scripts.git

Use Case 5: Faster New Repo Bootstrap

Create a repository and set origin once with the right identity from day one.

mkdir release-tool && cd release-tool
 git init
 git remote add origin git@github-work:your-org/release-tool.git
 git add .
 git commit -m "chore: initial scaffolding"
 git push -u origin main

Quick Daily Checklist

  • Use alias hosts in every clone URL
  • Keep repository folders grouped by account context
  • Verify once with git remote -v, then continue normally
  • Use git config user.email per repo only when intentionally overriding