Skip to content

공용 서버에서 특정 계정으로 git commit 하기 #4

@tmfdk333

Description

@tmfdk333

공용 서버에서 특정 계정으로 git commit 하기

  • For only a single command
    • 공용 서버에서 사용하는 프로젝트에서 config 설정할 수 없는 경우 일회성 명령 사용
git -c user.name="seula.k" -c user.email="seula.k@navercorp.com commit -m "commit message"
  • For single repository
    • 프로젝트마다 다른 이름과 이메일 주소를 사용하고 싶은 경우
git config user.name "tmfdk333"
git config user.email "tmfdk333@gmail.com"
  • For every repository on your computer
    • 시스템 전체에서 사용자 설정을 할 경우
git config --global user.name "tmfdk333"
git config --global user.email "tmfdk333@gmail.com"
  • 설정 확인
    • Git은 같은 키를 여러 파일(/etc/config, ~/.gitconfig)에서 읽을 경우, 나중 값을 사용함
git config --list

Metadata

Metadata

Assignees

Labels

GitGit / Github

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions