Git - git config


Why do we sometimes have to use 'git pull' with a full URL and sometimes we can omit the URL?

When Bob cloned Alice’s repository, Git stored the location of her repository in the repository configuration, and that location is used for pulls:

git pull

To display the remote URL:

git config --get remote.origin.url

The complete configuration created by git clone is visible using:

git config -l

How can we change various global configuration variables?

After installing Git, users should immediately set the user name and email address, which will be used for every Git commit. Type the following into Terminal or Command Line:

git config --global "Jane Smith"
git config --global ""

How can we confirm that you have the correct global configuration settings?

git config --global
git config --global

How can we change various configuration variables at the per project level?

Issue the 'git config' command without the --global flag.

How can we configure the default text editor?

git config --global core.editor emacs

How can we display a list of all configurable settings?

git config --list
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License