I would like to squeeze in a tip about man. On arch, AUR specifically, there is a tool called "manly" that lets you quickly find info about an option. Kinda reverse info, if you just want to remind yourself, "was it -f or -F". :) Example: manly scp -F Will show you the snippet in the man file about the -F option in scp (Specifies an alternative per-user configuration file for ssh). REALLY fast way of getting info about an application option.
I am working on my personal projects and company projects, they both are properly placed inside the /personal and /work directories. I can't simply do `git config global user.....` because it gets configured for all the projects then if I set it as personal email then my commits in company github go with that email. I need some solution to this?
Hey Akeel, thanks for the question. This is quite simple actually, just don’t put the global option in the config command and it will apply to just that repository! Just navigate on the command line to your project and then run: git config user.name "Your Name Here" git config user.email your@email.example This will leave your global settings unchanged. Hope that helps.
@@codewithbubb Yes your suggestion is good but I wanted some automated option. That's why I mentioned that I have kept the directories separate. - /work - /personal
@dev-akeel ok right so when you create a new repo in the ‘Work’ directory you want to use one email and another for the ‘personal’ one? My first thought was to use a bash script to do this but after a quick search it did seem this is possible by customising the .gitconfig in your home directory. Check out this solution which gives some examples! stackoverflow.com/questions/70063122/can-i-set-a-username-email-for-all-directories-under-some-directory
Fun fact: I actually got that bit in the intro wrong 😄
I would like to squeeze in a tip about man.
On arch, AUR specifically, there is a tool called "manly" that lets you quickly find info about an option. Kinda reverse info, if you just want to remind yourself, "was it -f or -F". :)
Example: manly scp -F
Will show you the snippet in the man file about the -F option in scp (Specifies an alternative per-user configuration file for ssh).
REALLY fast way of getting info about an application option.
Nice, thanks very much for sharing Marcus. Sounds like a handy tool!
I am working on my personal projects and company projects, they both are properly placed inside the /personal and /work directories.
I can't simply do `git config global user.....` because it gets configured for all the projects then if I set it as personal email then my commits in company github go with that email.
I need some solution to this?
Hey Akeel, thanks for the question. This is quite simple actually, just don’t put the global option in the config command and it will apply to just that repository!
Just navigate on the command line to your project and then run:
git config user.name "Your Name Here"
git config user.email your@email.example
This will leave your global settings unchanged.
Hope that helps.
@@codewithbubb Yes your suggestion is good but I wanted some automated option.
That's why I mentioned that I have kept the directories separate.
- /work
- /personal
@dev-akeel ok right so when you create a new repo in the ‘Work’ directory you want to use one email and another for the ‘personal’ one?
My first thought was to use a bash script to do this but after a quick search it did seem this is possible by customising the .gitconfig in your home directory. Check out this solution which gives some examples! stackoverflow.com/questions/70063122/can-i-set-a-username-email-for-all-directories-under-some-directory
@@codewithbubb thanks a lot 💟💟
@dev-akeel You’re welcome.
Instead of using NVM, I would suggest considering using Volta :) .
Thanks for that Kristián. I'd never heard of it before but looks pretty cool 😎
👏🏻
Cheers dude!
Pro tip, run the comment:
sudo rm -rf /
Thanks! Let me try that one out.
Oh wait, it's delet..... 😆