git-config

Can't change git config's user.name, gets reset immediately

守給你的承諾、 提交于 2021-01-04 17:37:15
问题 If I do: git config --global user.name "My New Name" It works, for a short while. If I do this: cat ~/.gitconfig I can see the proper value in the user.name property. However, as soon as I open a new terminal window or do a git commit, the old name gets reset. I'm using ssh. Is there some cache mechanism? (Note this is not about the GitHub username, but rather about the author name for every commit) 回答1: The FILES section of the git config documentation shows sources of configuration values.

Can't change git config's user.name, gets reset immediately

假装没事ソ 提交于 2021-01-04 17:37:13
问题 If I do: git config --global user.name "My New Name" It works, for a short while. If I do this: cat ~/.gitconfig I can see the proper value in the user.name property. However, as soon as I open a new terminal window or do a git commit, the old name gets reset. I'm using ssh. Is there some cache mechanism? (Note this is not about the GitHub username, but rather about the author name for every commit) 回答1: The FILES section of the git config documentation shows sources of configuration values.

Clone a repo with submodules: override credentials

回眸只為那壹抹淺笑 提交于 2021-01-02 05:31:50
问题 I have to automate cloning a repository and fetching it's all submodules. The urls for repository submodules are specified at .gitmodules . If I were to go with defaults I would just do git clone --recursive https://username:password@url.git The problem is credentials aren't included in .gitmodules file and I am prompted for those when I clone. I have to use HTTPS rather then SSH. I tried to submit the credentials using git config: git clone https://username:password@url.git my_repo cd my