Prompt Explained

July 24, 2016 ยท View on GitHub

The prompt built by gitHUD is made of 6 parts:

Each of these parts are described below and each of these parts are actually optional (all "on" by default). The specific documentation of each part tells you how to hide it if you wish to.

When not in a git repository

The gitHUD program exists promptly and does not display anything, i.e. leaves your prompt empty of any git-related information

Git Repo Indicator

Hidden by: show_part_repo_indicator=False

Output partDescription
repo_indicatorThis is a small prefix to the gitHUD output that indicates that you are in a git repository and that therefore gitHUD is doing some output.

Merge Branch information

Hidden by: show_part_merge_branch_commits_diff=False

This section is for branches that have a remote counterpart (typically long lived branches). It tells you the difference between your remote tracking branch and the branch it was created from (both of which can evolve because of you or because of your colleagues.

By default, this count does not include merge commits (that are redundant since the count includes the commits that are on the branch being merged)

No merge branch

When there is no remote merge branch, this section of the prompt is empty. This is typically the case when you work on master, or when you work on a local short lived feature branch that has no remote counterpart.

Output partDescription
no_upstreamThis means that the current branch (other than master) has no remote tracking branch (typically a short lived feature branch)

Merge branch

Output partDescriptionViz
merge_branch_pullThis means that the remote parent of your current remote tracking branch has some commits that will need to be merged back in your branchgitgraph_merge_branch_pull
merge_branch_pushThis means that your remote tracking branch has some commits that have not yet been merged and pushed to its parent branchgitgraph_merge_branch_push
merge_branch_push_pullThis means that both your remote tracking branch and its parent have evolved and you'll have some merge work to dogitgraph_merge_branch_push_pull

Local branch - detached information

Hidden by: show_part_local_branch=False

Output partDescription
local_branchThis is the name of the local branch you are working on
detachedThis is the commit sha on which you are, if you are not at the HEAD of a branch
(typically on rebase situations, conflict resolution, or exploration of an old repo state)

Commits to push-pull

Hidden by: show_part_commits_to_origin=False

Output partDescriptionViz
commits_pullThis means that some commits on you remote tracking branch have not been pulled (rebased?) locallygitgraph_commits_pull
commits_pushThis means that some local commits have not yet been pushed to the remote tracking branchgitgraph_commits_push
commits_push_pullThis means that some commits are to be pulled (rebased?) and some have to be pushedgitgraph_commits_pull_push

Local repository state

Hidden by: show_part_local_changes_state=False

Output partDescription
repo_changesThe first group is for the status of files in the index:
  • A: New files
  • D: Deleted files
  • M: Modified files
  • R: Renamed Files
The second and third groups are about local unstaged file modifications:
  • D: Deleted files
  • M: Modified files
  • A: New Files
conflictsThis indicates files in a conflicted state (typically in the middle of a merge or rebase)

Stashes

Hidden by: show_part_stashes=False

Output partDescription
stashThis means that there are some stashes in your repo