Git rev-parse: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
(Created page with "=Internal= * Git Commands")
 
Line 1: Line 1:
=Internal=
=Internal=
* [[Git_Commands#Local_Repository_Information|Git Commands]]
* [[Git_Commands#Local_Repository_Information|Git Commands]]
=Overview=
=Return the Value of $GIT_DIR=
<syntaxhighlight lang='bash'>
git rev-parse --git-dir
</syntaxhighlight>
If inside a git work area, return the relative path of [[Git_Environment_Variables#GIT_DIR|$GIT_DIR]] (.git in the root of the work area)

Revision as of 03:50, 16 July 2020

Internal

Overview

Return the Value of $GIT_DIR

git rev-parse --git-dir

If inside a git work area, return the relative path of $GIT_DIR (.git in the root of the work area)