From 34875a9615c9942f1d034e1c003a0a0165fc4291 Mon Sep 17 00:00:00 2001 From: EuAndreh Date: Fri, 14 Aug 2020 13:35:17 -0300 Subject: TIL on git: Fix stackoverflow link --- _tils/2020-08-14-browse-a-git-repository-at-a-specific-commit.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to '_tils') diff --git a/_tils/2020-08-14-browse-a-git-repository-at-a-specific-commit.md b/_tils/2020-08-14-browse-a-git-repository-at-a-specific-commit.md index 63bcf20..daa2c9e 100644 --- a/_tils/2020-08-14-browse-a-git-repository-at-a-specific-commit.md +++ b/_tils/2020-08-14-browse-a-git-repository-at-a-specific-commit.md @@ -29,7 +29,7 @@ git checkout ``` But git itself allows we to specific the directory of the checkout by using the -`--work-tree` global git flag[^src]. This is what `man git` says about it: +`--work-tree` global git flag. This is what `man git` says about it: ```txt --work-tree= @@ -67,6 +67,7 @@ And with that `` will only contain what was inside `src/` at ``. After any of those checkouts, you have to `git reset .` to reset your current staging area back to what it was before the checkout. -[^src]: I found out about this with [this StackOverflow answer][0]. -[0]: https://stackoverflow.com/questions/5283262/what-is-git-work-tree-why-have-i-never-needed-to-set-this-env-var-why-now +## References: + +1. [GIT: Checkout to a specific folder][0] (StackOverflow) -- cgit v1.2.3