I wish to configure git config in such a way so that the command git commit -m "some text"
will always prompt for the username AND password. Is this possible, and if so - how?
I'm on git 2.6.3 and I'm working with a private github repository which I clone onto my machine like this:
clone git https://github.com/user/private-repo.git
...and it will prompt me for my username and password.
I can then perform a git add some_file
but when I execute git commit -m "hello"
I get this:
*** Please tell me who you are
Run
git config --global user.email "you@example.com"
git config --globl user.name "Your name"
to set your account's default identity.
Omit --global to set the identity only in this repository.
fatal: empty ident name (for <fredrik@devcentos6.(none)>) not allowed
I am aware of that you can use the -c
option to define a user:
git -c "user.name=Your Name" -c "user.email=Your email" commit -m "hello"
However, I would want to get a username/password prompt upon simply executing git commit -m "hello"
. Is it possible to configure git config in such a way?
I will be using different usernames for different commits.