6
5

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Gitで使用できる環境変数

Posted at

GIT_AUTHOR_NAMEとかGIT_DIRとかGIT_SSHとか環境変数を設定してgitコマンド実行しているサンプルをたまに見るけど、環境変数の一覧みたいなのはどこにあるんだろうと探してみました。

$ man git

ENVIRONMENT VARIABLESってところにありました。

  • GIT_INDEX_FILE
  • GIT_INDEX_VERSION
  • GIT_OBJECT_DIRECTORY
  • GIT_ALTERNATE_OBJECT_DIRECTORIES
  • GIT_DIR
  • GIT_WORK_TREE
  • GIT_NAMESPACE
  • GIT_CEILING_DIRECTORIES
  • GIT_DISCOVERY_ACROSS_FILESYSTEM
  • GIT_AUTHOR_NAME
  • GIT_AUTHOR_EMAIL
  • GIT_AUTHOR_DATE
  • GIT_COMMITTER_NAME
  • GIT_COMMITTER_EMAIL
  • GIT_COMMITTER_DATE
  • EMAIL
  • GIT_DIFF_OPTS
  • GIT_EXTERNAL_DIFF
  • GIT_DIFF_PATH_COUNTER
  • GIT_DIFF_PATH_TOTAL
  • GIT_MERGE_VERBOSITY
  • GIT_PAGER
  • GIT_EDITOR
  • GIT_SSH
  • GIT_ASKPASS
  • GIT_CONFIG_NOSYSTEM
  • GIT_FLUSH
  • GIT_TRACE
  • GIT_TRACE_PACK_ACCESS
  • GIT_TRACE_PACKET
  • GIT_LITERAL_PATHSPECS
  • GIT_GLOB_PATHSPECS
  • GIT_ICASE_PATHSPECS
  • GIT_REFLOG_ACTION

たくさんある!

Gitに関する自動化をするときに指定してあげると便利になると思うので、それぞれどういうときに使えるのか調べたい。でも全部使う事はあまりないのかな。

6
5
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
6
5

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?