基本的な手順
ユーザー設定:
$ git config --global user.name "XXXXXX"
$ git config --global user.email "[email protected]"
現在の設定を確認してください。
$ git config --list
設定ファイルの保存場所:Git関連の設定は、デフォルトでアカウントの.gitconfigファイルに保存されます
プロジェクトごとに異なる作成者を設定する
$ git config --loca user.name xxxxx
$ git config --local user.email [email protected]
その他の設定
エディターの変更
VimはGitのデフォルトのエディターです。ターミナルで次のコマンドを実行して、エディターを変更できます
git config --global core.editor emacs
。VimエディターをEmacsに変更します。
略語を設定する
$ git config --global alias.co checkout
$ git config --global alias.br branch
設定が完了したら、git coと入力して、gitcheckoutコマンドを入力したのと同じ効果を実現します。