Home Explore Blog CI



git

1st chunk of `Documentation/config/advice.adoc`
1657fb42209860c66e4d8b25d2dbf0c3e4f0b3ba750619cc0000000100000da1
advice.*::
	These variables control various optional help messages designed to
	aid new users.  When left unconfigured, Git will give the message
	alongside instructions on how to squelch it.  You can tell Git
	that you have understood the issue and no longer need a specific
	help message by setting the corresponding variable to `false`.
+
As they are intended to help human users, these messages are output to
the standard error. When tools that run Git as a subprocess find them
disruptive, they can set `GIT_ADVICE=0` in the environment to squelch
all advice messages.
+
--
	addEmbeddedRepo::
		Shown when the user accidentally adds one
		git repo inside of another.
	addEmptyPathspec::
		Shown when the user runs `git add` without providing
		the pathspec parameter.
	addIgnoredFile::
		Shown when the user attempts to add an ignored file to
		the index.
	amWorkDir::
		Shown when linkgit:git-am[1] fails to apply a patch
		file, to tell the user the location of the file.
	ambiguousFetchRefspec::
		Shown when a fetch refspec for multiple remotes maps to
		the same remote-tracking branch namespace and causes branch
		tracking set-up to fail.
	checkoutAmbiguousRemoteBranchName::
		Shown when the argument to
		linkgit:git-checkout[1] and linkgit:git-switch[1]
		ambiguously resolves to a
		remote tracking branch on more than one remote in
		situations where an unambiguous argument would have
		otherwise caused a remote-tracking branch to be
		checked out. See the `checkout.defaultRemote`
		configuration variable for how to set a given remote
		to be used by default in some situations where this
		advice would be printed.
	commitBeforeMerge::
		Shown when linkgit:git-merge[1] refuses to
		merge to avoid overwriting local changes.
	detachedHead::
		Shown when the user uses
		linkgit:git-switch[1] or linkgit:git-checkout[1]
		to move to the detached HEAD state, to tell the user how
		to create a local branch after the fact.
	diverging::
		Shown when a fast-forward is not possible.
	fetchShowForcedUpdates::
		Shown when linkgit:git-fetch[1] takes a long time
		to calculate forced updates after ref updates, or to warn
		that the check is disabled.
	forceDeleteBranch::
		Shown when the user tries to delete a not fully merged
		branch without the force option set.
	ignoredHook::
		Shown when a hook is ignored because the hook is not
		set as executable.
	implicitIdentity::
		Shown when the user's information is guessed from the
		system username and domain name, to tell the user how to
		set their identity configuration.
	mergeConflict::
		Shown when various commands stop because of conflicts.
	nestedTag::
		Shown when a user attempts to recursively tag a tag object.
	pushAlreadyExists::
		Shown when linkgit:git-push[1] rejects an update that
		does not qualify for fast-forwarding (e.g., a tag.)
	pushFetchFirst::
		Shown when linkgit:git-push[1] rejects an update that
		tries to overwrite a remote ref that points at an
		object we do not have.
	pushNeedsForce::
		Shown when linkgit:git-push[1] rejects an update that
		tries to overwrite a remote ref that points at an
		object that is not a commit-ish, or make the remote
		ref point at an object that is not a commit-ish.
	pushNonFFCurrent::
		Shown when linkgit:git-push[1] fails due to a
		non-fast-forward update to the current branch.
	pushNonFFMatching::
		Shown when the user ran linkgit:git-push[1] and pushed
		"matching refs" explicitly (i.e. used `:`, or
		specified a refspec that isn't the

Title: Git Advice Variables
Summary
Git has various optional help messages to aid new users, which can be controlled and configured through advice variables to prevent or allow specific messages, and can be squelched by setting the corresponding variable to false or by setting GIT_ADVICE=0 in the environment.