Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

git-root: add page #6009

Merged
merged 14 commits into from
May 21, 2021
13 changes: 13 additions & 0 deletions pages/common/git-root.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# git root

> Print the root directory of the current Git repository.
> Part of `git-extras`.
> More information: <https://github.com/tj/git-extras/blob/master/Commands.md#git-root>.

- Print the absolute path of the current Git repository:

`git root`

- Print the current working directory relative to the root of the current Git repository:

`git root --relative`