B
B
beduin012014-09-01 21:37:18
git
beduin01, 2014-09-01 21:37:18

What is git checkout?

Who can explain in simple terms what git checkout is? I read a lot, but did not understand the essence.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
T
toxa82, 2014-09-02
@beduin01

The main function of git checkout is to move the HEAD pointer, i.e. then where your local copy is looking. You can move it to the top of the branch: or to a git checkout <branch>separate commit :git checkout <sha>git checkout -bgit checkout -- <file>

D
Den Totsky, 2014-09-02
@xDen

korobochkin wrote the main function of the command, I can also add that git checkout undoes file changes, it is enough to write git checkout <File name> and it will be returned to the primary commit state

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question