apt -o Acquire::socks::proxy="socks5://127.0.0.1:1080/" update
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
| #!/bin/bash | |
| # https://stackoverflow.com/questions/33104475/git-clone-and-pull-omitting-large-files | |
| git clone --no-checkout --filter=blob:limit=10k <URL> --depth=1 | |
| cd <repo> | |
| # https://stackoverflow.com/questions/77002971/can-i-force-git-to-stay-offline | |
| git config --unset remote.origin.promisor | |
| git config --unset remote.origin.partialclonefilter | |
| git switch $(git rev-parse --abbrev-ref HEAD) | |
| # The output of `git switch` may contain some errors due to missing large blobs |