I am a professional DevOps Engineer with a demonstrated history of working in the internet industry. I am an avid Linux lover and supporter of the open-source movement philosophy.
Software Manager, Agile Aficionado, Tech Dabbler, and Public Speaker. A lifelong learner, the prospect of something new and coffee are what get me up in the morning.
okay. You could've explained it better but...
So what you're saying is: you make those ssh files and in each project you create a .gitconfig and when you go all git add . / git commit -m"smthing" git push origin smthing .... IT WILL go to the correct repos?
OR you have to chnage your config email and username for each add/pull/push?
Thanks. What if you have 1 using GitHub and 1 using GitLab?
I'm guessing it's the same principle.
No difference, but you will need to replace
insteadOfpart with url pattern from GitLab (assuming this one is work)This is super handy! Very well explained!
Thanks a lot!
Just make sure to change the
remote "origin"url in theYOUR_PROJECT/.git/configfileVery cool, I'm still a command line type person and having this would be great when I want to do some personal stuff but keep it in my own repos.
okay. You could've explained it better but...
So what you're saying is: you make those ssh files and in each project you create a .gitconfig and when you go all git add . / git commit -m"smthing" git push origin smthing .... IT WILL go to the correct repos?
OR you have to chnage your config email and username for each add/pull/push?
No, sir. Sorry for that, will try to explain better.
You do this once:
If you do clone, pull, push inside this repo, you will use WORK account automatically (no need to switch or any other things, just
git pull/clone/pushIf you clone/push/pull outside this repo - it will use PERSONAL account
So you dont need to modify gitconfig for every working repo. as long as you have
~/path/work_dir/repo1
~/path/work_dir/repo2
~/path/work_dir/repo3
GUI clients like GitKraken also make this ridiculously easy
IF you use GUI clients)
In my case, I am "one IDE" kinda guy, so I have terminal and VS Code. )
But thanks for the comment!
Works like a charm.
thanks, I usualy change .git/config? to add multiple branch, like github and azure