Skip to content
masterclass Buddy

Git · Concept

HEAD

Git's main options can select the repository and working tree, change the command directory, control paging, and show the Git program path. These options affect one command invocation.

Last updated

Syntax

git [-C <path>] [--git-dir=<path>] [--work-tree=<path>] [-p|--paginate|-P|--no-pager] [--exec-path[=<path>]] <command>

In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.

Subscribe
  • GIT_DIR
  • GIT_WORK_TREE
  • GIT_EXEC_PATH
  • GIT_INDEX_FILE

Source: Git - git Documentation. Checked 2026-11-03.