Programing

Git이 구성 후에도 커밋을 허용하지 않는 이유는 무엇입니까?

lottogame 2020. 10. 12. 07:05
반응형

Git이 구성 후에도 커밋을 허용하지 않는 이유는 무엇입니까?


이 질문은 중복 된 것처럼 보이지만 실제로는 그렇지 않습니다. 계속 반복되는 약간의 차이. git은 설정 한 후에도 "당신이 누군지 알려주세요"라고 계속 말합니다. 내가 달리면 git commit이것이 내가 얻는 것입니다 ....

$ git commit

*** Please tell me who you are.

Run

git config --global user.email "you@example.com"

git config --global user.name "Your Name"

to set your account's default identity.
Omit --global to set the identity only in this repository.

fatal: unable to auto-detect email address (got 'Obby@ObbyWorkstation.(none)')

하지만 실행 git config --global -l하면 내 모든 세부 정보를 제공합니다 ...

$ git config --global -l
user.name=myname
user.mail=me.myself@gmail.com
http.proxy=proxy.XX.XX.XX:XXXX

내 이름, 이메일 및 프록시를 변경했지만 명령을 실행할 때 제대로 표시됩니다. .gitconfig 파일에서도 값이 설정되어있는 것을 볼 수 있습니다. 나는 전혀 저지를 수 없기 때문에 빠진 것이 무엇 일 수 있습니다. 내가 누군지 계속 물어볼 때마다?

@sheu는 내가 변경 한 것을 말했지만 여전히 같은 문제입니다. 내가을 설정해 --local도 여전히 git commit같은 질문을합니다. 이것은 출력입니다

$ git config --local -l
core.repositoryformatversion=0
core.filemode=false
core.bare=false
core.logallrefupdates=true
core.symlinks=false
core.ignorecase=true
core.hidedotfiles=dotGitOnly
user.name=myname
user.mail=me.myself@gmail.com

오타입니다. 실수로 e를 설정 user.mail하지 않았습니다 . 글로벌 구성에서 설정 하여 수정하십시오.user.email

git config --global user.email "you@example.com"

전역 git 옵션을 설정하고 있지만 로컬 체크 아웃에 재정의가 설정되어있을 수 있습니다. 로 다시 설정하십시오 git config --local <setting> <value>. .git/config로컬 체크 아웃에서 파일을보고 체크 아웃이 정의한 로컬 설정을 확인할 수 있습니다 .


로컬이 있습니까 user.name이나 user.email의 글로벌 한 오버 라이딩을?

git config --list --global | grep user
  user.name=YOUR NAME
  user.email=YOUR@EMAIL
git config --list --local | grep user
  user.name=YOUR NAME
  user.email=

그렇다면 제거하십시오.

git config --unset --local user.name
git config --unset --local user.email

로컬 설정은 클론 단위이므로 머신의 각 리포지토리 user.name로컬 설정을 해제 user.email해야합니다.

참고 URL : https://stackoverflow.com/questions/14662526/why-git-is-not-allowing-me-to-commit-even-after-configuration

반응형