diff options
author | EuAndreh <eu@euandre.org> | 2020-08-14 13:35:17 -0300 |
---|---|---|
committer | EuAndreh <eu@euandre.org> | 2020-08-14 13:35:39 -0300 |
commit | 34875a9615c9942f1d034e1c003a0a0165fc4291 (patch) | |
tree | 81c3fc04119254e433e6a4911e2b16cfe1d5833d | |
parent | default.nix: Remove existing HTML before publishing (diff) | |
download | euandre.org-34875a9615c9942f1d034e1c003a0a0165fc4291.tar.gz euandre.org-34875a9615c9942f1d034e1c003a0a0165fc4291.tar.xz |
TIL on git: Fix stackoverflow link
-rw-r--r-- | _tils/2020-08-14-browse-a-git-repository-at-a-specific-commit.md | 7 |
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) |