Skip to main content
added 115 characters in body
Source Link
kaligne
  • 906
  • 4
  • 11
  • 29

Solved. I am speechless. I had made a quick check for a ~/.git-whatever file using bash autocompletion (tab), it did not work so I blindly assumed the issue was somewhere else. Patrick's comment shed the light: I carefully checked using ls -a ~/, the ~/.gitconfig he wrote about really is here, and it holds the information regarding the remote:

$ cat ~/.gitconfig [user] name = myaccount email = [email protected] [remote "origin"] push = [email protected]:myaccount/p2.git 

And now I remember the cause for this: while experimenting I used the command git config --global remote.origin [email protected]:myaccount/p2.git and I changed other global configurations. I just did not understand what the --global did as I found no alteration in the repo/.git/config file.


Additional doc on git configuration: https://git-scm.com/book/en/v2/Customizing-Git-Git-Configuration

Solved. I am speechless. I had made a quick check for a ~/.git-whatever file using bash autocompletion (tab), it did not work so I blindly assumed the issue was somewhere else. Patrick's comment shed the light: I carefully checked using ls -a ~/, the ~/.gitconfig he wrote about really is here, and it holds the information regarding the remote:

$ cat ~/.gitconfig [user] name = myaccount email = [email protected] [remote "origin"] push = [email protected]:myaccount/p2.git 

And now I remember the cause for this: while experimenting I used the command git config --global remote.origin [email protected]:myaccount/p2.git and I changed other global configurations. I just did not understand what the --global did as I found no alteration in the repo/.git/config file.

Solved. I am speechless. I had made a quick check for a ~/.git-whatever file using bash autocompletion (tab), it did not work so I blindly assumed the issue was somewhere else. Patrick's comment shed the light: I carefully checked using ls -a ~/, the ~/.gitconfig he wrote about really is here, and it holds the information regarding the remote:

$ cat ~/.gitconfig [user] name = myaccount email = [email protected] [remote "origin"] push = [email protected]:myaccount/p2.git 

And now I remember the cause for this: while experimenting I used the command git config --global remote.origin [email protected]:myaccount/p2.git and I changed other global configurations. I just did not understand what the --global did as I found no alteration in the repo/.git/config file.


Additional doc on git configuration: https://git-scm.com/book/en/v2/Customizing-Git-Git-Configuration

Source Link
kaligne
  • 906
  • 4
  • 11
  • 29

Solved. I am speechless. I had made a quick check for a ~/.git-whatever file using bash autocompletion (tab), it did not work so I blindly assumed the issue was somewhere else. Patrick's comment shed the light: I carefully checked using ls -a ~/, the ~/.gitconfig he wrote about really is here, and it holds the information regarding the remote:

$ cat ~/.gitconfig [user] name = myaccount email = [email protected] [remote "origin"] push = [email protected]:myaccount/p2.git 

And now I remember the cause for this: while experimenting I used the command git config --global remote.origin [email protected]:myaccount/p2.git and I changed other global configurations. I just did not understand what the --global did as I found no alteration in the repo/.git/config file.