KEll
KEll

Reputation: 29

Git bash setup rejecting global/ local parameters, can't set up user account

OS: Win8.1 64bit; Git v 2.9.0

Git bash 2.9.0 set up rejecting user name & email configuration error messages.

enter image description here

Upvotes: 1

Views: 607

Answers (2)

KEll
KEll

Reputation: 29

  • There are no brackets around the local or global parameters.
  • There are spaces between the defined parameters and arguments
  • user.name is entered as:

    $ git config --global user.name "Your Name"
    $ git config --local user.name "Your Name"
    
  • user.email is entered as:

    $ git config --global user.email "Your email"
    $ git config --local user.email "Your email
    

To verify user name and user email:

$ git config --list

Upvotes: 1

JrBenito
JrBenito

Reputation: 1003

In command, I typed in the code provided by our TA: config [--local | --global] user.email "my [email protected]"; rec'd error messages:: --global] user.email command not found

The notation [--local | --global] is an optional OR choice. [-A|-B] means you shall use -A or -B as parameters to call the program. So, you want to:

$ git config --local user.email [email protected]

or

$ git config --global user.email [email protected]

From git help config: (bold is mine)

When reading, the values are read from the system, global and repository local configuration files by default, and options --system, --global, --local and --file can be used to tell the command to read from only that location (see the section called “FILES”).

  • --local means repository only configuration.
  • --global means all your git operations (user level)
  • --system means system wide configuration (users defaults for those that has not set above levels)

Upvotes: 1

Related Questions