Skip to content

Instantly share code, notes, and snippets.

@gchait
Created December 13, 2025 13:15
Show Gist options
  • Select an option

  • Save gchait/bb1a879ed6799c6644e1067b904c7db2 to your computer and use it in GitHub Desktop.

Select an option

Save gchait/bb1a879ed6799c6644e1067b904c7db2 to your computer and use it in GitHub Desktop.
Download a Git repository at a specific commit
mkdir -p xxx
cd ./xxx
git init -q
git remote add origin git@aaa.zzz.com:yyy/xxx.git
git fetch origin "${SHA}"
git checkout -q FETCH_HEAD
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment