cheetsheet/git

September 08, 2021

レポジトリによってメールアドレスを変える

まずはデフォルトを設定

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

アドレスを変えたいレポジトリに移動してから

git config --local user.name "ユーザー名"
git config --local user.email メールアドレス

リモートレポジトリ

origin とは別にリモートレポジトリを追加したい場合がある。

コマンド 効果
git remote add john http://dev.example.com/john.git 追加
git remote -v 確認
git push john test-branch_ push

Profile picture

Written by tin-machine 技術関連のメモ Twitter