LoginSignup
0
0

More than 1 year has passed since last update.

githubにpushするアカウントを変更する

Posted at

やりたいこと

異なるアカウントでgitにログインしたい

以下のコマンドを実行してユーザネームとメールアドレスを変更する

$ git config --global user.name "username"
$ git config --global user.email "email address"

確認

git config user.name
git config user.email

余談

git initの取り消しやremoteのurlアドレスを変更したいときのコマンドもここに示しておく

git initの取り消し(リポジトリの削除)

rm -rf .git

remoteの再設定

git remote rm origin
git remote origin <設定したいurl>
git remote -v  #確認
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