From 94c603c47dd20571ec0aff8697d2ae90938bd8f0 Mon Sep 17 00:00:00 2001 From: Dana Date: Fri, 19 Jan 2018 15:22:24 -0800 Subject: [PATCH] Adding draft solution for Recovering Older Versions of a File exercise --- _episodes/05-history.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/_episodes/05-history.md b/_episodes/05-history.md index 1c0ef810d7..f5d8280417 100644 --- a/_episodes/05-history.md +++ b/_episodes/05-history.md @@ -351,6 +351,12 @@ moving backward and forward in time becomes much easier. > 4. `$ git checkout data_cruncher.py` > > 5. Both 2 and 4 +> > ## Solution +> > `git checkout HEAD` does not check out that specific file +> > `$ git checkout HEAD data_cruncher.py` works to recover her previously committed version +> > `$ git checkout HEAD~1 data_cruncher.py` checks out the version from 2 commits ago (one before the most recent one called HEAD) +> > `$ git checkout data_cruncher.py` also recovers her previously committed version +> {: .solution} {: .challenge} > ## Reverting a Commit