snippetbashTip
git root — Print the root directory of the current Git repository. Part of `git-extras`. More information: <htt
Viewed 0 times
thedirectorycommandcliprintgit rootroot
Problem
How to use the
git root command: Print the root directory of the current Git repository. Part of git-extras. More information: <https://github.com/tj/git-extras/blob/main/Commands.md#git-root>.Solution
git root — Print the root directory of the current Git repository. Part of git-extras. More information: <https://github.com/tj/git-extras/blob/main/Commands.md#git-root>.Print the absolute path of the current Git repository:
git rootPrint the current working directory relative to the root of the current Git repository:
git root {{[-r|--relative]}}Code Snippets
Print the absolute path of the current Git repository
git rootPrint the current working directory relative to the root of the current Git repository
git root {{[-r|--relative]}}Context
tldr-pages: common/git root
Revisions (0)
No revisions yet.