.git/config: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
 
(5 intermediate revisions by the same user not shown)
Line 5: Line 5:
<code>[[.git/config]]</code> maintains repository specific configuration is maintained, which is read and written with <code>git config --local [...]</code>
<code>[[.git/config]]</code> maintains repository specific configuration is maintained, which is read and written with <code>git config --local [...]</code>


=Configuration Elements=
=<span id='Entries'></span>Configuration Elements=
Configuration elements maintained in <code>/etc/gitconfig</code>, <code>.gitconfig</code> and <code>.config/git/config</code> apply:
{{Internal|Git_Configuration#Configuration_Elements|Git Configuration &#124; Configuration Elements}}
{{Internal|Git_Configuration#Configuration_Elements|Git Configuration &#124; Configuration Elements}}
Additionally, the following specific configuration elements also apply:


=Entries=
==<tt>[core]</tt>==
==<tt>[remote]</tt>==
<code>[remote]</code> entires represent [[Git Concepts#Remote|remotes]] for the current repository, and are manipulated by the <code>[[git remote#Overview|git remote]]</code> command.
<syntaxhighlight lang='ini'>
[remote "origin"]
    url = https://gogs-cicd.apps.openshift.novaordis.io/gogs/novaordis-session-servlet.git
    fetch = +refs/heads/*:refs/remotes/origin/*
</syntaxhighlight>
More than one <code>[remote]</code> entries are possible if the local repository has multiple [[Git Concepts#Remote|remotes]].


==[core]==
==<tt>[branch]</tt>==
 
==[remote]==
 
[remote] entires represent [[Git Concepts#Remote|remotes]] for the current repository, and are manipulated by the [[git remote#Overview|git remote]] command.
 
[remote "origin"]
        url = https&#58;//gogs-cicd.apps.openshift.novaordis.io/gogs/novaordis-session-servlet.git
        fetch = +refs/heads/*:refs/remotes/origin/*
 
More than one [remote] entries are possible, in case the local repository has multiple [[Git Concepts#Remote|remotes]].
 
==[branch]==


See {{Internal|Git_branch#Link_the_Local_Branch_its_Tracking_Branch|Link a Local Branch to its Tracking Branch}}
See {{Internal|Git_branch#Link_the_Local_Branch_its_Tracking_Branch|Link a Local Branch to its Tracking Branch}}


==[http]==
==<tt>[http]</tt>==
 
See {{Internal|Git_config#Turn_Off_SSL_Server_Certificate_Verification_for_a_Specific_Repository|Turn Off SSL Server Certificate Verification for a Specific Repository}}
See {{Internal|Git_config#Turn_Off_SSL_Server_Certificate_Verification_for_a_Specific_Repository|Turn Off SSL Server Certificate Verification for a Specific Repository}}
==[user]==
Maintains user identity information, configured with [[Git_config#Configure_the_Commit_Author|git config]].
    name = John Doe
    email = john@doe.com

Latest revision as of 22:51, 9 January 2024

Internal

Overview

.git/config maintains repository specific configuration is maintained, which is read and written with git config --local [...]

Configuration Elements

Configuration elements maintained in /etc/gitconfig, .gitconfig and .config/git/config apply:

Git Configuration | Configuration Elements

Additionally, the following specific configuration elements also apply:

[core]

[remote]

[remote] entires represent remotes for the current repository, and are manipulated by the git remote command.

[remote "origin"]
    url = https://gogs-cicd.apps.openshift.novaordis.io/gogs/novaordis-session-servlet.git
    fetch = +refs/heads/*:refs/remotes/origin/*

More than one [remote] entries are possible if the local repository has multiple remotes.

[branch]

See

Link a Local Branch to its Tracking Branch

[http]

See

Turn Off SSL Server Certificate Verification for a Specific Repository