Use many different Git accounts automatically
Preparing the folder structure for using new setup
At the moment I have different git accounts.
I have one for Github (work & private), Gitlab and two accounts for Codeberg (private and a even more private one).
To get this running I had to prepare my folders a little bit. before I only had everything in two folders, private and work, but it all used the same GitHub account.
/home/joergi/dev/projects/
├─ privat/
│ ├─ codeberg/
│ │ ├─ private/
│ │ │ ├─ project1/
│ │ │ ├─ project2/
│ │ ├─ more-private/
│ │ │ ├─ projectA/
│ │ │ ├─ projectB/
│ ├─ gitlab/
│ │ ├─ projectGL1/
│ │ ├─ projectGL2/
│ ├─ github/
│ │ ├─ projectPrivatGH1/
│ │ ├─ projectPrivatGH2/
├─ work
│ ├─ github
When I only used Github, my .gitconfig
looked like this: