• home
  • about
  • 全ての投稿
  • ソフトウェア・ハードウェアの設定のまとめ
  • 分析関連のまとめ
  • ヘルスケア関連のまとめ
  • 生涯学習関連のまとめ

git config

date: 2023-12-11 excerpt: gitの設定

tag: gitgithubconfig


gitの設定

概要

  • git configコマンドまたは~/.gitconfigファイルによって設定を行う

~/.gitconfigの設定例

[user]
    email = gimpeik@icloud.com
    name = Gimpei Kobayashi
[core]
    quotepath = false
    editor = vim
[init]
    defaultBranch = main

コマンドによる設定

  • ユーザ名の設定
    • git config --global user.name "Gimpei Kobayashi"
  • メールアドレスの設定
    • git config --global user.email "gimpeik@icloud.com"
  • デフォルトブランチの設定
    • git config --global init.defaultBranch main
  • デフォルトエディタの設定
    • git config --global core.editor vim
  • ファイル名の文字コードの設定
    • git config --global core.quotepath false

設定の確認

  • git config --list


gitgithubconfig Share Tweet