LoginSignup
2
3

More than 5 years have passed since last update.

Git 設定メモ

Posted at

めったにやらないことで覚えてられないのでメモ。

名前とメールアドレスの設定

コミットメッセージに名前とメールアドレスを記録するために次の設定を行う。

$ git config --global user.name "hogehoge tarou"
$ git config --global user.email "tarou@hogehoge.net"

日本語のファイル名を表示する

次を設定すると、エスケープされずに表示できる

$ git config --global core.quotepath false

Postバッファを大きくする

HTTP/HTTPSでpushする場合にバッファが小さいと失敗する。
大きいファイル、大量のファイルをpushしようとしてエラーとなる場合はバッファ不足も疑ってみる。
とりあえず100MBぐらい設定しておけば大概大丈夫。次のように設定する。

$ git config http.postBuffer 104857600

上記だとひとつのリポジトリでの設定になる。グローバルに設定するには次のようにする。

$ git config --global http.postBuffer 104857600

グローバルな gitignore を設定する

次を実行して、~/.gitignore_global を作成して設定する。

$ git config --global core.excludesfile ~/.gitignore_global
2
3
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
2
3