728x90
728x90
git을 사용하다 보면 같은 서버에서 git add > commit > push를 해야 할때가 있는데
이미 설정된 사람이 있다면 내 이름이 아닌 다른사람 이름으로 push가 되는데 이를 방지하기 위해
변경하는 방법에 대해서 알아보겠다
1. 사용자 이름 변경하기
해당 프로젝트의 최상위 단에서 각각 기입해주면 됩니다.
global 옵션도 있지만 다른사람과 같이 쓸떼는 지양하게 됩니다.
git config user.name "Nuridal"
git config user.email "nuridal@email.com"
그리고 난 뒤 잘 변경되었는지 확인하려면 git config --list로 잘 변경되었는지 확인합니다.
git config --list
diff.astextplain.textconv=astextplain
filter.lfs.clean=git-lfs clean -- %f
filter.lfs.smudge=git-lfs smudge -- %f
filter.lfs.process=git-lfs filter-process
filter.lfs.required=true
http.sslbackend=openssl
http.sslcainfo=C:/Program Files/Git/mingw64/etc/ssl/certs/ca-bundle.crt
core.autocrlf=true
core.fscache=true
core.symlinks=true
pull.rebase=false
credential.helper=manager
credential.https://dev.azure.com.usehttppath=true
init.defaultbranch=master
safe.directory=*
core.autocrlf=false
core.repositoryformatversion=0
core.filemode=false
core.bare=false
core.logallrefupdates=true
core.ignorecase=true
remote.origin.url=https://github.com/Nuridal/project-name.git
remote.origin.fetch=+refs/heads/*:refs/remotes/origin/*
branch.main.remote=origin
branch.main.merge=refs/heads/main
branch.main.vscode-merge-base=origin/main
user.name=Nuridal
user.email=nuridal@email.com
매우 간단하지만 매번 할때마다 찾기에
한번 정리해보았습니다!
![](https://t1.daumcdn.net/keditor/emoticon/niniz/large/038.gif)
728x90
300x250
'CODE > Git' 카테고리의 다른 글
[Git] 나의 git repo에 이모지를 넣어보자! (0) | 2024.11.16 |
---|---|
[Git] 한 컴퓨터에서 github 여러 계정 사용하기 (2) | 2023.08.30 |