Thanks Ben - I hadnât really thought of using the GitHub web ui itself (so many places to choose from ;) Effectively the ~1 syntax Guille mentioned is exactly what youâve explained (so that hangs together nicely). Now looking back at the tutorial I had followed, I didnât notice the ~1 in there. This one will be firmly embedded in my brain for sure. Still, its stuff like this that helps you learn the wider toolset in play. Tim p.s. Appreciate you guys following up with me - it was bugging me in the background. I kept returning to it, annoyed that it didnât work and should (now completely explained)
On 28 Jun 2018, at 12:25, Ben Coman <btc@openInWorld.com> wrote:
On 28 June 2018 at 07:38, Tim Mackinnon <tim@testit.works <mailto:tim@testit.works>> wrote: Hey thanks Ben - this still doesnât work for me⦠good idea to try on the Pharo repo itself.
I have a fork of it, which I catch up periodically - so I tried a similar suggestion to you - went into my directory (underneath the src folder) and typed:
log --diff-filter=D --summary --graph --pretty='format:%cd | %h | %H | %cn%n-> %s%nâ
This gave me:
Tue Jun 19 19:28:37 2018 +0200 | 13e81343e | 13e81343e8a23a8d6ca43f1c77b804b8134fc986 | CyrilFerlicot -> Remove now useless logs
delete mode 100755 bootstrap/scripts/printFolderContent.sh
Mon Jun 18 16:50:19 2018 +0200 | 0433d908d | 0433d908de2987fa0069a47dee1f0794ccbb52c2 | GitHub -> Revert "22161-Add-more-log-to-bootstrap"
delete mode 100755 bootstrap/scripts/printFolderContent.sh
Thu Jun 14 11:41:16 2018 +0200 | b4a285a61 | b4a285a61d3eb0cc1e642b2fcc242dac7092617f | Marcus Denker -> fix the last sender of #asIcon https://pharo.fogbugz.com/f/cases/22139/fix-the-last-sender-of-asIcon <https://pharo.fogbugz.com/f/cases/22139/fix-the-last-sender-of-asIcon>
delete mode 100644 src/Polymorph-Widgets-Rules/IconShortcutRule.class.st <http://iconshortcutrule.class.st/>
So then I tried to recover that last one (again at root underneath the src directory)
git checkout b4a285a61 src/Polymorph-Widgets-Rules/IconShortcutRule.class.st <http://iconshortcutrule.class.st/> error: pathspec 'src/Polymorph-Widgets-Rules/IconShortcutRule.class.st <http://iconshortcutrule.class.st/>' did not match any file(s) known to git.
Concrete examples help. I get the same error when I try checking that file out from b4a285a61
Now looking at https://github.com/pharo-project/pharo/tree/b4a285a61/src/Polymorph-Widgets-... <https://github.com/pharo-project/pharo/tree/b4a285a61/src/Polymorph-Widgets-...> there is no file IconShortcutRule.class.st <http://iconshortcutrule.class.st/>
So from try clicking the <History> button, and currently at the top you'll see " b4a28" on Jun 14, and the next one down is "d4b4464". Click the "<>" button to the right of that, then browse back to .../src/Polymorph-Widgets-Rules and now you'll see IconShortcutRule.class.st <http://iconshortcutrule.class.st/>
So the following works for me... git checkout d4b4464 src/Polymorph-Widgets-Rules/IconShortcutRule.class.st <http://iconshortcutrule.class.st/>
In summary ;), you can't check out a file from a commit that doesn't exist in that commit.
HTH cheers -ben