<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sect2 SYSTEM "../../../dtd/dblite.dtd">
<sect2 id="tgit-dug-settings-git">
	<title>Git</title>
	<sect3 id="tgit-dug-settings-hierarchical">
		<title>The hierarchical Git configuration</title>
		<para>
			Git uses the concept of a hierarchical configuration (cf. <gitdoclink cmd="git-config" section="1"/>). I.e. there are multiple levels; settings in higher levels override values in lower levels. The <guilabel>Effective</guilabel> tab shows you the effective values for the current scope (read-only).
		</para>
		<para>
			Select any level (e.g. <guilabel>Local</guilabel> - the current repository settings stored locally in <filename>.git/config</filename>, <guilabel>Project</guilabel> - settings for the current repository stored within the repository in <filename>/.tgitconfig</filename>, <guilabel>Global</guilabel> - settings for the current user, <guilabel>System</guilabel> - settings for all users of the system) to see the values stored there.
		</para>
		<para>
			In order to change settings select a level, enter the values, select where to store to and click on <guibutton>Apply</guibutton>.
		</para>
		<caution>
			<para>
				If you want to inherit a value of a higher level don't leave a textbox empty (this means than an empty string will be stored, which might evaluate to <literal>true</literal>), select <guilabel>Inherit</guilabel> instead.
			</para>
		</caution>
	</sect3>
	<sect3 id="tgit-dug-settings-config">
		<title>Git Config</title>
		<?dbhh topicname="HIDD_SETTINGIT_CONFIG"?>
		<?dbhh topicname="HIDD_FIRSTSTARTWIZARD_USER"?>
		<para>
			<figure id="tgit-dug-settings-git-config">
				<title>The Settings Dialog, Git</title>
				<graphic fileref="../images/SettingsGitConfig.png"/>
			</figure>
		</para>
		<para> Set git basic configuration </para>
		<para><guilabel>Name</guilabel> and <guilabel>Email</guilabel> are required for git to operate correctly.</para>
		<para> <guilabel>AutoCrLf</guilabel>
			If true, makes git convert CRLF at the end of lines in text files
			to LF when reading from the filesystem, and convert in reverse when
			writing to the filesystem. The variable can be set to input,
			in which case the conversion happens only while reading from
			the filesystem but files are written out with LF at the end of lines.
			A file is considered "text" (i.e. be subjected to the AutoCrLf mechanism)
			based on the file's CRLF attribute, or if CRLF is unspecified,
			based on the file's contents.
		</para>
		<para> <guilabel>SafeCrLf</guilabel>
			If true, makes git check if converting CRLF as controlled by <literal>core.autocrlf</literal> is reversible.
			Git will verify if a command modifies a file in the work tree either directly or indirectly.
			For example, committing a file followed by checking out the same file should yield the original file in the work tree.
			If this is not the case for the current setting of <literal>core.autocrlf</literal>, git will reject the file.
			The variable can be set to "warn",
			in which case git will only warn about an irreversible conversion but continue the operation.
		</para>
		<para><guilabel>QuotePath</guilabel> Controls the <literal>core.quotepath</literal> setting which might be interesting when you have non ASCII filenames: See <gitdoclink cmd="git-config" section="1"/>.</para>
		<important>
			<para>
				If you have problems entering/storing data please see <xref linkend="tgit-dug-settings-hierarchical"/>.
			</para>
		</important>
	</sect3>
	<sect3 id="tgit-dug-settings-remote">
		<title>Remote</title>
		<?dbhh topicname="HIDD_SETTINREMOTE"?>
		<?dbhh topicname="HIDD_ADD_REMOTE"?>
		<para>
			<figure id="tgit-dug-settings-git-remote">
				<title>The Settings Dialog, Git, Remote</title>
				<graphic fileref="../images/SettingsGitRemote.png"/>
			</figure>
		</para>
		<para> Set Git remote configuration </para>
		<para>
			<guilabel>Remote</guilabel>
			The name of the remote, usually the default one is called <literal>origin</literal>.
		</para>
		<para>
			<guilabel>URL</guilabel>
			The URL of the remote. It can be HTTP / HTTPS / SSH / Git protocol or local file system.
		</para>
		<para>
			<guilabel>Push URL</guilabel>
			The Push URL of the remote.
			It is for some cases you cannot use the same URL to fetch and push
			(for example, fetch via password-less Git protocol but push via SSH). Otherwise, leave it empty.
			Note: This is not designed for forking workflow. For forking workflow, you should have 2 remotes.
			The format is the same as URL.
		</para>
		<para>
			<guilabel>Putty Key</guilabel>
			The putty key file to load when performing network operations.
		</para>
		<para>
			<guilabel>Tag</guilabel>
			This sets <literal>remote.&lt;name&gt;.tagopt</literal> config, which controls the default tag fetching behavior of the specified remote.
			<option>Reachable</option>: Download tags that are reachable from remote branch heads (default behavior).
			<option>None</option>: No tags are downloaded (<literal>--no-tags</literal>).
			(git 1.9 and later) <option>All</option>: All tags as well as branches are downloaded (<literal>--tags</literal>).
			(prior to git 1.9) <option>All tags only</option>: Only all tags are downloaded but no branches are downloaded (<literal>--tags</literal>).
			Use case of <option>All</option>: Always fetch tags from a git-svn mirror.
			Subversion tags never exist on trunk, so such tags are not reachable from branch heads.
		</para>
		<para>
			<guilabel>Push Default</guilabel>
			Selecting this means to always push to this remote (cf. <gitdoclink cmd="git-config" section="1"/>)
			Default is false.
		</para>
		<para>
			<guilabel>Prune</guilabel>
			This sets <literal>remote.&lt;name&gt;.prune</literal> config, which controls the default prune option of remote tracking branches of the specified remote.
			Default is false.
		</para>
	</sect3>
	<sect3 id="tgit-dug-settings-credential">
		<title>Credential</title>
		<?dbhh topicname="HIDD_SETTINGSCREDENTIAL"?>
		<para>
			<figure id="tgit-dug-settings-git-credential">
				<title>The Settings Dialog, Git, Credential</title>
				<graphic fileref="../images/SettingsGitCredential.png"/>
			</figure>
		</para>
		<para>Set simple credential helper configuration</para>
		<para>
			<guilabel>Advanced</guilabel>
			This is used if the credential helper configuration does not match any simple settings.
			If you choose other than <option>Advanced</option>, except the corresponding <literal>credential.helper</literal>, all other config keys <literal>credential.*</literal> or <literal>credential.*.*</literal> are removed.
		</para>
		<para>
			<guilabel>None</guilabel>
			No credential config keys are in all config levels.
		</para>
		<para>
			<guilabel>manager-core - this repository only</guilabel>
			Git Credential Manager Core (manager-core; <ulink url="https://github.com/microsoft/Git-Credential-Manager-Core">https://github.com/microsoft/Git-Credential-Manager-Core</ulink>) is enabled in local config only.
			This option is visible only if manager-core is installed.
		</para>
		<para>
			<guilabel>manager - this repository only</guilabel>
			Git Credential Manager (manager; <ulink url="https://github.com/microsoft/Git-Credential-Manager-for-Windows">https://github.com/microsoft/Git-Credential-Manager-for-Windows</ulink>) is enabled in local config only.
			This option is visible only if manager is installed.
		</para>
		<para>
			<guilabel>wincred - this repository only</guilabel>
			wincred is enabled in local config only.
			This option is visible only if wincred is installed.
		</para>
		<para>
			<guilabel>winstore - this repository only</guilabel>
			winstore is enabled in local config only.
			This option is visible only if winstore is installed for current Windows user.
		</para>
		<para>
			<guilabel>manager-core - current Windows user</guilabel>
			Git Credential Manager Core (manager-core; <ulink url="https://github.com/microsoft/Git-Credential-Manager-Core">https://github.com/microsoft/Git-Credential-Manager-Core</ulink>) is enabled in global config only.
			This option is visible only if manager-core is installed.
		</para>
		<para>
			<guilabel>manager - current Windows user</guilabel>
			Git Credential Manager (manager; <ulink url="https://github.com/microsoft/Git-Credential-Manager-for-Windows">https://github.com/microsoft/Git-Credential-Manager-for-Windows</ulink>) is enabled in global config only.
			This option is visible only if manager is installed.
		</para>
		<para>
			<guilabel>wincred - current Windows user</guilabel>
			wincred is enabled in global config only.
			This option is visible only if wincred is installed.
		</para>
		<para>
			<guilabel>winstore - current Windows user</guilabel>
			winstore is enabled in global config only.
			This option is visible only if winstore is installed for current Windows user.
		</para>
		<para>
			<guilabel>manager-core - all Windows users</guilabel>
			Git Credential Manager Core (manager-core; <ulink url="https://github.com/microsoft/Git-Credential-Manager-Core">https://github.com/microsoft/Git-Credential-Manager-Core</ulink>) is enabled in system config only.
			This option is visible only if manager-core is installed.
			Change to this option requires administrator privileges.
		</para>
		<para>
			<guilabel>manager - all Windows users</guilabel>
			Git Credential Manager (manager; <ulink url="https://github.com/microsoft/Git-Credential-Manager-for-Windows">https://github.com/microsoft/Git-Credential-Manager-for-Windows</ulink>) is enabled in system config only.
			This option is visible only if manager is installed.
			Change to this option requires administrator privileges.
		</para>
		<para>
			<guilabel>wincred - all Windows users</guilabel>
			wincred is enabled in system config only.
			This option is visible only if wincred is installed.
			Change to this option requires administrator privileges.
		</para>
		<para>Advanced credential helper configuration</para>
		<para>
			<guilabel>Config type</guilabel>
			Either Local, Global or System config.
		</para>
		<para>
			<guilabel>URL</guilabel>
			Define a context-specific configuration based on URL pattern. By default, the path component is not considered as a different context.
		</para>
		<para>
			<guilabel>Helper</guilabel>
			Select a credential helper program.
			manager-core, manager, wincred, and winstore are predefined in TortoiseGit.
			It is possible to use other credential helpers or with extra options.
		</para>
		<para>
			<guilabel>Username</guilabel>
			A default username, if one is not provided in the URL.
		</para>
		<para>
			<guilabel>Use HTTP path component</guilabel>
			Also considers the path component of URL to match the configuration context.
		</para>
		<para>
			You can find more information at <gitdoclink cmd="gitcredentials" section="7"/>.
		</para>
	</sect3>
</sect2>
