What is the function of ‘git checkout’ in git?



What is the function of ‘git checkout’ in git?..

Answer / Anant Prasad Vema

'Git checkout' allows you to switch branches, move between different versions of a file (with -b for creating a new branch), or recover a previous commit (using the commit hash). It also creates or updates the working directory and staging area to match the state of the selected branch or commit.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Git Interview Questions

What does a commit object contain?

1 Answers  


What is the purpose of branching and how many branching strategies can you apply?

1 Answers  


What is Subgit? Why to use Subgit?

1 Answers  


What is ‘head’ in git?

1 Answers  


What is git fork?

1 Answers  


What is a git commit and what does the commit object contain?

1 Answers  


How do you find a list of files that have changed in a particular commit?

1 Answers  


What work is restored when the deleted branch is recovered?

1 Answers  


What is subgit and why is it used?

1 Answers  


What is a commit message?

1 Answers  


What is rebasing syntax in git?

1 Answers  


What is git bisect? How can you use it to determine the source of a (regression) bug?

1 Answers  


Categories