I know this question has been asked a million times, but my ~/.gitconfig consists of only two lines, that are character correct with the tutorial.
git config --global user.name "trx"
git config --global user.email [email protected]
What could be the issue here?
The . git/config file in each repository is used to store the configuration for that repository, and $HOME/. gitconfig is used to store a per-user configuration as fallback values for the . git/config file. The file /etc/gitconfig can be used to store a system-wide default configuration.
gitconfig) should really contain the settings that apply to ALL your repositories. Primarily things like user.name , user. email , core. editor , merge , and diff should be pretty consistently set.
gitconfig located in the user's home folder (C:\Users\git user) Local Git configuration: File named config in the . git folder of the local repo.
The reason they can't find gitconfig is simply because it's nowhere to be found. When developers install Git, the various Git configuration files won't automatically create. Files like gitconfig and . gitconfig are only created when they're first used.
This is my ~/.gitconfig:
[user]
name = Luigi R. Viggiano
email = luigi.viggiano@...
[color]
ui = true
[merge]
tool = p4merge
[diff]
tool = p4merge
[push]
default = simple
your ~/.gitconfig
is not in the correct format.
You don't need to put the commands:
git config --global user.name "trx"
git config --global user.email [email protected]
in a file... you need to type them at the terminal.
Delete your ~/.gitconfig
and manipulate it using the git config
command at the terminal, as explained in the tutorial.
These git config
lines are commands that you should run, not the contents for the config file.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With