aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--_tils/2020-08-14-browse-a-git-repository-at-a-specific-commit.md7
1 files changed, 4 insertions, 3 deletions
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 <my-commit>
```
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=<path>
@@ -67,6 +67,7 @@ And with that `<dir>` will only contain what was inside `src/` at `<commit>`.
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)