29 July 2024

Get Code Snapshot from Specific Commit in Git

Here's how you can get code snapshot from a specific commit in Git. Let's go through the steps.
git fetch
Update the branch
git pull
Find the commit hash, eg. commit-hash
git log
Checkout the branch while creating it.
git checkout -b branch_name commit-hash