I recently added a conditional statement to my .gitconfig I order to use two git profiles. However, now I must append my username to every repo url in order for it to be found.
Added to .gitconfig
[includeIf "gitdir:~/work/"]
path = ~/work/.gitconfig
When you copy and paste a url directly from Github the url looks like this
https://github.com/user123/my-amazing-project.git
So if I forgot to add the username in while I clone it (which I usually do) I need to run;
git remote add origin https://user123@github.com/user123/my-amazing-project.git
Is there anyway to avoid this?