Created
May 24, 2022 01:54
-
-
Save PythonCoderAS/1817d8e815d9a8bf7678561bbcaa0b1d to your computer and use it in GitHub Desktop.
Homebrew uninstall deleted cask #hombrew #homebrew cask #cask #git
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Go to the homebrew-cask directory | |
| $ cd $(brew --repository)/Library/Taps/homebrew/homebrew-cask/Casks | |
| # Bring up commit logs for the interested cask | |
| $ git log --full-history -- jbidwatcher.rb | |
| # Find the SHA of the last commit where the file was active. This will usually be the second commit on the list, | |
| # where the first one is the commit where the file got deleted. | |
| # For the jbidwatcher cask, this was 1d5f7ef8dd72f236d1edd100448473bec127a1e4 | |
| # Restore the file. | |
| $ git checkout 1d5f7ef8dd72f236d1edd100448473bec127a1e4 -- jbidwatcher.rb | |
| # Run your command | |
| $ brew uninstall jbidwatcher | |
| # Remove the file | |
| $ rm jbidwatcher.rb |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment