git checkout

git checkout switches between branches or restores files to an earlier state. It moves HEAD to a different branch or commit so your working directory…