Answers for "set git global config"

40

git config global

$ git config --global user.name "John Doe"
$ git config --global user.email [email protected]
Posted by: Guest on February-08-2020
3

git config list

git config --global --list
Posted by: Guest on November-23-2020
1

what is my git config

git config --list
Posted by: Guest on March-19-2020
5

change global user name git

$ git config --global user.name "Mona Lisa"
Posted by: Guest on July-30-2020
2

git config

Edit:
	git config -e <optional:--gloabl.--local>
    git config remote.origin.url [email protected]:user/repo.git
Show:
	git config -l <optional:--show-origin>
								└—Show ALL with config level & location (system>global>repo-higher lvl overrides lower)

Level Specific
1. System level (applied to every user on the system and all their repositories)
  to view:
      git config --list --system (may need sudo)
  to set:
      git config --system color.ui true
  to edit system config file:
      git config --edit --system
2. Global level (values specific personally to you, the user).
  to view:
      git config --list --global
  to set:
      git config --global user.name xyz
  to edit global config file:
      git config --edit --global
3. Repository level (specific to that single repository)
  to view:
      git config --list --local
  to set:
      git config --local core.ignorecase true (--local optional)
  to edit repository config file:
      git config --edit --local (--local optional)
Posted by: Guest on August-20-2021
4

git global config location

To track down the file holding each config option set on your own system:
  git config --list --show-origin

Generally, there are three configs:
  * git config puts stuff in <repo root>/.git/config by default
  * git config --global puts stuff in <user home>/.gitconfig
    * On Linux/macOS, this means ~/.gitconfig
    * On Windows, this means %HOMEDRIVE%%HOMEPATH%.gitconfig
      (not %USERPROFILE%.gitconfig; these are not always the same)
  * git config --system puts stuff in a global config file shared by all users
    * On Linux, it's /etc/gitconfig
    * On macOS, it's /Applications/Xcode.app/Contents/Developer/usr/etc/gitconfig
    * On Windows, it's <wherever you installed Git>/etc/gitconfig
Posted by: Guest on May-03-2021

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language