

Įmail = our config files created, we'll now edit the. gitconfig-work file to set up work credential. Įmail = we set up the Personal folder credential, we will create a. gitconfig-personal and as content, simply recipient of the email. To do this, in your home ( cd ~), create a file called. Now, we need to tell git that the Personal folder repositories will use the email " and not the default email we set up earlier. All repositories within each base folder will use the same credentials, different from the default and without configuration by repository. The idea is pretty simple: we'll have two base folders ( Work and Personal) where the repositories will be stored according to their respective origin. And look how cool git does that!Ī git account per folder: the light at the end of the tunnel Personally, what I can do to make my life simpler, I’m doing and a nice idea would be to configure git so that every time I create a repository in a given folder, the credentials I want are automatically assigned to it. Lot of job right? There're people who don't think so. If your work account email changes or you have a new git account? You'll need to make the change in all repositories. It will be a bit annoying that you have to configure the correct credential in each of the repositories. Now, imagine that you have several work repositories and several personal repositories. Now, when committing, my registered email will be the work email. If we commit the changes now, my personal account (system default) will be registered, but I need to use the work email, So, we need to configure the new credentials in the repository. It actually uses a different email account because it's a company project and not a personal project like new_repo. what if my project uses a different account?Ī git account per repository: still piece of cake, but it can be a little tricky So, everything is fine with our configuration but. mkdir new_repo & cd " $_ "Īnd if I take a look at the git log, this will be the result: commit 036573401e5788917383a27fb6c2acf607f5e441 (HEAD -> master )

Git config -global user.email now on, all the repositories you create will use these credentials. git config -global user.name "Tom Benevides" It needed to ensure that what was put in, was exactly what was obtained afterwards Īccording to him, these three parameters were sufficient to discard virtually all versioning systems until then, so he decided to build his own system.Ī single git account on Linux: kid's stuffĮveryone who has ever set up a local git user knows that it have no secrets.

#How to make a new file in uni software
Torvald's idea was to have a simple versioning system that met three requirements that he himself considered indispensable (and that other software couldn't guarantee): For those who still don't know much about this little guy, it was created by Linus Benedict Torvalds, a Finnish software engineer, naturalized American, known as the creator of linux kernel. Tipically, one of the first tools that a developer learns when starting the "dev journey" is git.
