0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Gitで異なるユーザーでcommit pushしたい時

Last updated at Posted at 2025-04-15

現在グローバルでgitにログインしているユーザーの確認コマンド

git config --global user.name
git config --global user.email

リポジトリ単位での確認コマンド

git config user.name
git config user.email

gitのグローバル設定の変更コマンド

git config --global user.name "新しいユーザー名"
git config --global user.email "新しいメールアドレス"

リポジトリ単位での設定確認コマンド(推奨)

git config user.name "リポジトリ用ユーザー名"
git config user.email "リポジトリ用メールアドレス"

個人開発だけの用途では、グローバル設定も変えていいが、
会社でのパソコンを使って個人開発などする方はリポジトリ単位で切り替えた方が良い。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?